Accept stale scan snapshot in deploy smoke

This commit is contained in:
2569718930@qq.com
2026-06-30 18:39:13 +08:00
parent ee1162f15f
commit 5bad2ec398
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -297,6 +297,10 @@ wait_for_scan_terminal_snapshot() {
echo "$name ready after attempt $i/$attempts"
return 0
fi
if printf '%s' "$compact" | grep -q '"status":"stale"'; then
echo "$name stale snapshot available after attempt $i/$attempts"
return 0
fi
if printf '%s' "$compact" | grep -q '"stale_reason":"市场扫描快照正在初始化"'; then
echo "$name initializing after attempt $i/$attempts"
return 0
@@ -311,7 +315,7 @@ wait_for_scan_terminal_snapshot() {
fi
done
echo "$name did not return status=ready or http=401"
echo "$name did not return status=ready/stale or http=401"
return 1
}
+2
View File
@@ -277,6 +277,8 @@ def test_deploy_script_retries_startup_smoke_checks():
assert "smoke_check()" in script
assert "wait_for_scan_terminal_snapshot()" in script
assert '"status":"ready"' in script
assert '"status":"stale"' in script
assert "stale snapshot available" in script
assert "http=401" in script
assert '"stale_reason":"市场扫描快照正在初始化"' in script
assert "initializing after attempt" in script