summaryrefslogtreecommitdiffstats
path: root/tests/integration
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-04 17:58:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-04 17:58:41 +0000
commitd7bc17f61954de2a29ab751e53ee1ce90d3a49e1 (patch)
treec9320c4588fc639b2c5aacf878edd67bccebfc57 /tests/integration
parentAdding upstream version 5:7.2.4. (diff)
downloadredis-upstream.tar.xz
redis-upstream.zip
Adding upstream version 5:7.2.5.upstream/5%7.2.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/integration/aof.tcl25
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]