mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
test(backups): cover a restore that starts on an idle ClickHouse sidecar
The strategy suite only exercised restore against a busy sidecar, so a gate that wrongly blocked restore on an idle one would have stayed green. Assisted-by: LLM Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
This commit is contained in:
1 parent
a25db5aeb6
commit
3a10f956cc
1 file changed
+8
-1
@@ -117,10 +117,17 @@ run_script() {
|
||||
render_script "$tmp/s.sh" backup myapp
|
||||
run_script "$tmp"
|
||||
grep -q '^POST .*/backup/create_remote?name=clickhouse-myapp-' "$tmp/state/requests"
|
||||
# All three busy answers were consumed before the operation was started.
|
||||
[ "$(cat "$tmp/state/busy")" = 0 ]
|
||||
}
|
||||
|
||||
@test "restore on an idle sidecar starts restore_remote of the listed archive" {
|
||||
tmp=$(mktemp -d)
|
||||
make_stubs "$tmp/bin" "$tmp/state"
|
||||
render_script "$tmp/s.sh" restore myapp
|
||||
run_script "$tmp"
|
||||
grep -q '^POST .*/backup/restore_remote/clickhouse-myapp-20260101T000000Z$' "$tmp/state/requests"
|
||||
}
|
||||
|
||||
@test "backup fails without starting create_remote when the sidecar stays busy" {
|
||||
tmp=$(mktemp -d)
|
||||
make_stubs "$tmp/bin" "$tmp/state"
|
||||
|
||||
Reference in new issue
Block a user