Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xindoo
redis
提交
7f7499ee
R
redis
项目概览
xindoo
/
redis
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7f7499ee
编写于
6月 02, 2010
作者:
P
Pieter Noordhuis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tags for existing tests
上级
73bd6c58
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
329 addition
and
321 deletion
+329
-321
tests/integration/aof.tcl
tests/integration/aof.tcl
+48
-46
tests/integration/replication.tcl
tests/integration/replication.tcl
+1
-1
tests/unit/auth.tcl
tests/unit/auth.tcl
+1
-1
tests/unit/basic.tcl
tests/unit/basic.tcl
+39
-39
tests/unit/cas.tcl
tests/unit/cas.tcl
+1
-1
tests/unit/expire.tcl
tests/unit/expire.tcl
+1
-1
tests/unit/sort.tcl
tests/unit/sort.tcl
+123
-121
tests/unit/type/hash.tcl
tests/unit/type/hash.tcl
+1
-1
tests/unit/type/list.tcl
tests/unit/type/list.tcl
+1
-1
tests/unit/type/set.tcl
tests/unit/type/set.tcl
+1
-1
tests/unit/type/zset.tcl
tests/unit/type/zset.tcl
+112
-108
未找到文件。
tests/integration/aof.tcl
浏览文件 @
7f7499ee
...
...
@@ -22,14 +22,15 @@ proc start_server_aof {overrides code} {
kill_server $srv
}
## Test the server doesn't start when the AOF contains an unfinished MULTI
create_aof
{
tags
{
"aof"
}
{
## Test the server doesn't start when the AOF contains an unfinished MULTI
create_aof
{
append_to_aof
[
formatCommand set foo hello
]
append_to_aof
[
formatCommand multi
]
append_to_aof
[
formatCommand set bar world
]
}
}
start_server_aof
[
list dir $server_path
]
{
start_server_aof
[
list dir $server_path
]
{
test
{
Unfinished MULTI: Server should not have been started
}
{
is_alive $srv
}
{
0
}
...
...
@@ -37,15 +38,15 @@ start_server_aof [list dir $server_path] {
test
{
Unfinished MULTI: Server should have logged an error
}
{
exec cat
[
dict get $srv stdout
]
| tail -n1
}
{
*Unexpected end of file reading the append only file*
}
}
}
## Test that the server exits when the AOF contains a short read
create_aof
{
## Test that the server exits when the AOF contains a short read
create_aof
{
append_to_aof
[
formatCommand set foo hello
]
append_to_aof
[
string range
[
formatCommand set bar world
]
0 end-1
]
}
}
start_server_aof
[
list dir $server_path
]
{
start_server_aof
[
list dir $server_path
]
{
test
{
Short read: Server should not have been started
}
{
is_alive $srv
}
{
0
}
...
...
@@ -53,22 +54,22 @@ start_server_aof [list dir $server_path] {
test
{
Short read: Server should have logged an error
}
{
exec cat
[
dict get $srv stdout
]
| tail -n1
}
{
*Bad file format reading the append only file*
}
}
}
## Test that redis-check-aof indeed sees this AOF is not valid
test
{
Short read: Utility should confirm the AOF is not valid
}
{
## Test that redis-check-aof indeed sees this AOF is not valid
test
{
Short read: Utility should confirm the AOF is not valid
}
{
catch
{
exec ./redis-check-aof $aof_path
}
str
set _ $str
}
{
*not valid*
}
}
{
*not valid*
}
test
{
Short read: Utility should be able to fix the AOF
}
{
test
{
Short read: Utility should be able to fix the AOF
}
{
exec echo y | ./redis-check-aof --fix $aof_path
}
{
*Successfully truncated AOF*
}
}
{
*Successfully truncated AOF*
}
## Test that the server can be started using the truncated AOF
start_server_aof
[
list dir $server_path
]
{
## Test that the server can be started using the truncated AOF
start_server_aof
[
list dir $server_path
]
{
test
{
Fixed AOF: Server should have been started
}
{
is_alive $srv
}
{
1
}
...
...
@@ -77,4 +78,5 @@ start_server_aof [list dir $server_path] {
set client
[
redis
[
dict get $srv host
]
[
dict get $srv port
]]
list
[
$client
get foo
]
[
$client
get bar
]
}
{
hello
{}}
}
}
tests/integration/replication.tcl
浏览文件 @
7f7499ee
start_server
{}
{
start_server
{
tags
{
"repl"
}
}
{
r set mykey foo
start_server
{}
{
...
...
tests/unit/auth.tcl
浏览文件 @
7f7499ee
start_server
{
overrides
{
requirepass foobar
}}
{
start_server
{
tags
{
"auth"
}
overrides
{
requirepass foobar
}}
{
test
{
AUTH fails when a wrong password is given
}
{
catch
{
r auth wrong!
}
err
format $err
...
...
tests/unit/basic.tcl
浏览文件 @
7f7499ee
start_server
{
tags
{
basic
}}
{
start_server
{
tags
{
"basic"
}}
{
test
{
DEL all keys to start with a clean DB
}
{
foreach key
[
r keys *
]
{
r del $key
}
r dbsize
...
...
@@ -52,7 +52,7 @@ start_server {tags {basic}} {
r get foo
}
[
string repeat
"abcd"
1000000
]
tags
{
slow
}
{
tags
{
"slow"
}
{
test
{
Very big payload random access
}
{
set err
{}
array set payload
{}
...
...
tests/unit/cas.tcl
浏览文件 @
7f7499ee
start_server
{}
{
start_server
{
tags
{
"cas"
}
}
{
test
{
EXEC works on WATCHed key not modified
}
{
r watch x y z
r watch k
...
...
tests/unit/expire.tcl
浏览文件 @
7f7499ee
start_server
{}
{
start_server
{
tags
{
"expire"
}
}
{
test
{
EXPIRE - don't set timeouts multiple times
}
{
r set x foobar
set v1
[
r expire x 5
]
...
...
tests/unit/sort.tcl
浏览文件 @
7f7499ee
start_server
{}
{
start_server
{
tags
{
"sort"
}
}
{
test
{
SORT ALPHA against integer encoded strings
}
{
r del mylist
r lpush mylist 2
...
...
@@ -8,6 +8,7 @@ start_server {} {
r sort mylist alpha
}
{
1 10 2 3
}
tags
{
"slow"
}
{
test
{
Create a random list and a random set
}
{
set tosort
{}
array set seenrand
{}
...
...
@@ -132,6 +133,7 @@ start_server {} {
flush stdout
format
{}
}
{}
}
test
{
SORT regression for issue #19, sorting floats
}
{
r flushdb
...
...
tests/unit/type/hash.tcl
浏览文件 @
7f7499ee
start_server
{}
{
start_server
{
tags
{
"hash"
}
}
{
test
{
HSET/HLEN - Small hash creation
}
{
array set smallhash
{}
for
{
set i 0
}
{
$i
< 8
}
{
incr i
}
{
...
...
tests/unit/type/list.tcl
浏览文件 @
7f7499ee
start_server
{}
{
start_server
{
tags
{
"list"
}
}
{
test
{
Basic LPUSH, RPUSH, LLENGTH, LINDEX
}
{
set res
[
r lpush mylist a
]
append res
[
r lpush mylist b
]
...
...
tests/unit/type/set.tcl
浏览文件 @
7f7499ee
start_server
{}
{
start_server
{
tags
{
"set"
}
}
{
test
{
SADD, SCARD, SISMEMBER, SMEMBERS basics
}
{
r sadd myset foo
r sadd myset bar
...
...
tests/unit/type/zset.tcl
浏览文件 @
7f7499ee
start_server
{}
{
start_server
{
tags
{
"zset"
}
}
{
test
{
ZSET basic ZADD and score update
}
{
r zadd ztmp 10 x
r zadd ztmp 20 y
...
...
@@ -162,6 +162,7 @@ start_server {} {
r zrangebyscore zset 2 4 withscores
}
{
b 2 c 3 d 4
}
tags
{
"slow"
}
{
test
{
ZRANGEBYSCORE fuzzy test, 100 ranges in 1000 elements sorted set
}
{
set err
{}
r del zset
...
...
@@ -241,6 +242,7 @@ start_server {} {
}
set _ $err
}
{}
}
test
{
ZRANGEBYSCORE with LIMIT
}
{
r del zset
...
...
@@ -356,6 +358,7 @@ start_server {} {
list
[
r zinterstore zsetc 2 zseta zsetb aggregate max
]
[
r zrange zsetc 0 -1 withscores
]
}
{
2
{
b 2 c 3
}}
tags
{
"slow"
}
{
test
{
ZSETs skiplist implementation backlink consistency test
}
{
set diff 0
set elements 10000
...
...
@@ -397,6 +400,7 @@ start_server {} {
}
set _ $err
}
{}
}
test
{
ZSET element can't be set to nan with ZADD
}
{
set e
{}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录