Skip to content

Commit 3a10f95

Browse files
committed
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 <[email protected]>
1 parent a25db5a commit 3a10f95

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎hack/altinity-backup-strategy.bats‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,17 @@ run_script() {
117117
render_script "$tmp/s.sh" backup myapp
118118
run_script "$tmp"
119119
grep -q '^POST .*/backup/create_remote?name=clickhouse-myapp-' "$tmp/state/requests"
120-
# All three busy answers were consumed before the operation was started.
121120
[ "$(cat "$tmp/state/busy")" = 0 ]
122121
}
123122

123+
@test "restore on an idle sidecar starts restore_remote of the listed archive" {
124+
tmp=$(mktemp -d)
125+
make_stubs "$tmp/bin" "$tmp/state"
126+
render_script "$tmp/s.sh" restore myapp
127+
run_script "$tmp"
128+
grep -q '^POST .*/backup/restore_remote/clickhouse-myapp-20260101T000000Z$' "$tmp/state/requests"
129+
}
130+
124131
@test "backup fails without starting create_remote when the sidecar stays busy" {
125132
tmp=$(mktemp -d)
126133
make_stubs "$tmp/bin" "$tmp/state"

0 commit comments

Comments
 (0)