Skip to content

Commit e327857

Browse files
la14-1louisgvclaude
authored
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>
1 parent 70bba83 commit e327857

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

sh/e2e/lib/clouds/gcp.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ process.stdout.write(d.GCP_ZONE || '');
8080
return 1
8181
fi
8282

83+
# Check if billing is enabled on the project. Without billing, instance
84+
# creation always fails — skip early so the orchestrator reports "skipped"
85+
# instead of failing every agent individually. See #3091.
86+
local _billing_enabled
87+
_billing_enabled=$(gcloud billing projects describe "${GCP_PROJECT}" \
88+
--format="value(billingEnabled)" 2>/dev/null || true)
89+
if [ "${_billing_enabled}" = "False" ]; then
90+
log_err "Billing is disabled on GCP project '${GCP_PROJECT}' — cannot create instances"
91+
log_err "Re-enable billing at: https://console.cloud.google.com/billing/linkedaccount?project=${GCP_PROJECT}"
92+
return 1
93+
fi
94+
8395
log_ok "GCP credentials validated (project: ${GCP_PROJECT}, zone: ${GCP_ZONE:-us-central1-a})"
8496
return 0
8597
}

0 commit comments

Comments
 (0)