-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support command cmd * Add testcase for COMMAND command * FIX runtest return rm command's status instead of tcl test script's status
- Loading branch information
1 parent
9d099db
commit 005488f
Showing
6 changed files
with
134 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ set ::all_tests { | |
unit/introspection | ||
unit/limits | ||
unit/geo | ||
unit/command | ||
integration/replication | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
start_server {tags {"command"}} { | ||
test {kvrocks has 155 commands currently} { | ||
r command count | ||
} {155} | ||
|
||
test {acquire GET command info by COMMAND INFO} { | ||
set e [lindex [r command info get] 0] | ||
assert_equal [llength $e] 6 | ||
assert_equal [lindex $e 0] get | ||
assert_equal [lindex $e 1] 2 | ||
assert_equal [lindex $e 2] {readonly} | ||
assert_equal [lindex $e 3] 1 | ||
assert_equal [lindex $e 4] 1 | ||
assert_equal [lindex $e 5] 1 | ||
} | ||
|
||
test {COMMAND - command entry length check} { | ||
set e [lindex [r command] 0] | ||
assert_equal [llength $e] 6 | ||
} | ||
|
||
test {get keys of commands by COMMAND GETKEYS} { | ||
assert_equal {test} [r command getkeys get test] | ||
assert_equal {test test2} [r command getkeys mget test test2] | ||
assert_equal {test} [r command getkeys zadd test 1 m1] | ||
} | ||
} |