diff options
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/aof.tcl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/integration/aof.tcl b/tests/integration/aof.tcl index 1f73fc3..6f2eb05 100644 --- a/tests/integration/aof.tcl +++ b/tests/integration/aof.tcl @@ -529,6 +529,18 @@ tags {"aof external:skip"} { assert_match "*Start checking Old-Style AOF*is valid*" $result } + test {Test redis-check-aof for old style resp AOF - has data in the same format as manifest} { + create_aof $aof_dirpath $aof_file { + append_to_aof [formatCommand set file file] + append_to_aof [formatCommand set "file appendonly.aof.2.base.rdb seq 2 type b" "file appendonly.aof.2.base.rdb seq 2 type b"] + } + + catch { + exec src/redis-check-aof $aof_file + } result + assert_match "*Start checking Old-Style AOF*is valid*" $result + } + test {Test redis-check-aof for old style rdb-preamble AOF} { catch { exec src/redis-check-aof tests/assets/rdb-preamble.aof @@ -577,6 +589,19 @@ tags {"aof external:skip"} { assert_match "*Start checking Multi Part AOF*Start to check BASE AOF (RDB format)*DB preamble is OK, proceeding with AOF tail*BASE AOF*is valid*Start to check INCR files*INCR AOF*is valid*All AOF files and manifest are valid*" $result } + test {Test redis-check-aof for Multi Part AOF contains a format error} { + create_aof_manifest $aof_dirpath $aof_manifest_file { + append_to_manifest "file appendonly.aof.1.base.aof seq 1 type b\n" + append_to_manifest "file appendonly.aof.1.incr.aof seq 1 type i\n" + append_to_manifest "!!!\n" + } + + catch { + exec src/redis-check-aof $aof_manifest_file + } result + assert_match "*Invalid AOF manifest file format*" $result + } + test {Test redis-check-aof only truncates the last file for Multi Part AOF in fix mode} { create_aof $aof_dirpath $aof_base_file { append_to_aof [formatCommand set foo hello] |