Accept stale scan snapshot in deploy smoke
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user