mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
test(clickhouse): check why the round-trip restore failed, not only that it did
The refused-delete and failed-lookup cases asserted a non-zero status alone, which any earlier failure in the restore also produces, so a stub drifting from the script would have kept them green for the wrong reason. They now also require the delete to have been attempted and the lookup failure to be named. Assisted-by: LLM Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
This commit is contained in:
1 parent
d20b26d2ed
commit
4345a346cc
1 file changed
+10
@@ -133,6 +133,11 @@ restore() {
|
||||
cat "$err" >&2
|
||||
false
|
||||
fi
|
||||
grep -qE '^-n tenant-root delete secret seaweedfs-s3-ingress-tls( |$)' "$STUB/calls" || {
|
||||
echo "restore_shared_state failed before it reached the Secret delete; kubectl calls:" >&2
|
||||
cat "$STUB/calls" "$err" >&2
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
@test "a Secret lookup that fails fails the restore" {
|
||||
@@ -142,6 +147,11 @@ restore() {
|
||||
cat "$err" >&2
|
||||
false
|
||||
fi
|
||||
grep -q 'could not list the Secrets labelled' "$err" || {
|
||||
echo "restore_shared_state failed without naming the Secret lookup:" >&2
|
||||
cat "$err" >&2
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
@test "the run step's finally restores the shared objects" {
|
||||
|
||||
Reference in new issue
Block a user