mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
fix(e2e): skip GCP tests when billing is disabled (#3146)
Add a billing pre-check to _gcp_validate_env so the E2E orchestrator
skips GCP gracefully ("skipped — credentials not configured") instead
of failing every agent individually when billing is disabled.
Fixes #3091
Agent: test-engineer
Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
70bba831f6
commit
e3278578ee
1 changed files with 12 additions and 0 deletions
|
|
@ -80,6 +80,18 @@ process.stdout.write(d.GCP_ZONE || '');
|
|||
return 1
|
||||
fi
|
||||
|
||||
# Check if billing is enabled on the project. Without billing, instance
|
||||
# creation always fails — skip early so the orchestrator reports "skipped"
|
||||
# instead of failing every agent individually. See #3091.
|
||||
local _billing_enabled
|
||||
_billing_enabled=$(gcloud billing projects describe "${GCP_PROJECT}" \
|
||||
--format="value(billingEnabled)" 2>/dev/null || true)
|
||||
if [ "${_billing_enabled}" = "False" ]; then
|
||||
log_err "Billing is disabled on GCP project '${GCP_PROJECT}' — cannot create instances"
|
||||
log_err "Re-enable billing at: https://console.cloud.google.com/billing/linkedaccount?project=${GCP_PROJECT}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
log_ok "GCP credentials validated (project: ${GCP_PROJECT}, zone: ${GCP_ZONE:-us-central1-a})"
|
||||
return 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue