-set defaults [list [list appendonly yes] [list appendfilename appendonly.aof]]
+set defaults { appendonly {yes} appendfilename {appendonly.aof} }
set server_path [tmpdir server.aof]
set aof_path "$server_path/appendonly.aof"
proc start_server_aof {overrides code} {
upvar defaults defaults srv srv server_path server_path
- set _defaults $defaults
- set srv [start_server {overrides [lappend _defaults $overrides]}]
+ set config [concat $defaults $overrides]
+ set srv [start_server [list overrides $config]]
uplevel 1 $code
kill_server $srv
}
## 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
+ exec src/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
+ exec echo y | src/redis-check-aof --fix $aof_path
} {*Successfully truncated AOF*}
## Test that the server can be started using the truncated AOF