diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-06-02 23:14:55 +0200 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-06-02 23:22:25 +0200 |
commit | 7f7499eeace8f69aeb32a4e92554eb0b144e8226 (patch) | |
tree | cd753f2778e4b84c188f024173d98bb0d6950a3d /tests/integration/aof.tcl | |
parent | 73bd6c583b9a3e29dbbbf4f1ba8259cfe5e131b8 (diff) | |
download | redis-7f7499eeace8f69aeb32a4e92554eb0b144e8226.tar.gz |
tags for existing tests
Diffstat (limited to 'tests/integration/aof.tcl')
-rw-r--r-- | tests/integration/aof.tcl | 94 |
1 files changed, 48 insertions, 46 deletions
diff --git a/tests/integration/aof.tcl b/tests/integration/aof.tcl index ea2b399a9..aca8a0f41 100644 --- a/tests/integration/aof.tcl +++ b/tests/integration/aof.tcl @@ -22,59 +22,61 @@ proc start_server_aof {overrides code} { kill_server $srv } -## 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] -} +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] { - test {Unfinished MULTI: Server should not have been started} { - is_alive $srv - } {0} + start_server_aof [list dir $server_path] { + test {Unfinished MULTI: Server should not have been started} { + is_alive $srv + } {0} - 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 {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 { - append_to_aof [formatCommand set foo hello] - append_to_aof [string range [formatCommand set bar world] 0 end-1] -} + ## 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] { - test {Short read: Server should not have been started} { - is_alive $srv - } {0} + start_server_aof [list dir $server_path] { + test {Short read: Server should not have been started} { + is_alive $srv + } {0} - 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 {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} { - catch { - exec ./redis-check-aof $aof_path - } str - set _ $str -} {*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*} -test {Short read: Utility should be able to fix the AOF} { - exec echo y | ./redis-check-aof --fix $aof_path -} {*Successfully truncated AOF*} + test {Short read: Utility should be able to fix the AOF} { + exec echo y | ./redis-check-aof --fix $aof_path + } {*Successfully truncated AOF*} -## 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} + ## 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} - test {Fixed AOF: Keyspace should contain values that were parsable} { - set client [redis [dict get $srv host] [dict get $srv port]] - list [$client get foo] [$client get bar] - } {hello {}} + test {Fixed AOF: Keyspace should contain values that were parsable} { + set client [redis [dict get $srv host] [dict get $srv port]] + list [$client get foo] [$client get bar] + } {hello {}} + } } |