forked from molecule-ai/molecule-core
fix(e2e): CP DELETE /cp/admin/tenants body uses 'confirm', not 'confirm_token'
Verified against live staging: the admin endpoint returns 400 'confirm field must equal the URL slug' when the body key is 'confirm_token'. Every workflow's safety-net teardown step + the main harness + the Playwright teardown all had the wrong key. Fixed all six call sites. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d7193dfa34
commit
6bd674e412
2
.github/workflows/canary-staging.yml
vendored
2
.github/workflows/canary-staging.yml
vendored
@ -148,6 +148,6 @@ jobs:
|
||||
curl -sS -X DELETE "$MOLECULE_CP_URL/cp/admin/tenants/$slug" \
|
||||
-H "Authorization: Bearer $ADMIN_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"confirm_token\":\"$slug\"}" >/dev/null || true
|
||||
-d "{\"confirm\":\"$slug\"}" >/dev/null || true
|
||||
done
|
||||
exit 0
|
||||
|
||||
2
.github/workflows/e2e-staging-canvas.yml
vendored
2
.github/workflows/e2e-staging-canvas.yml
vendored
@ -111,6 +111,6 @@ jobs:
|
||||
curl -sS -X DELETE "$MOLECULE_CP_URL/cp/admin/tenants/$slug" \
|
||||
-H "Authorization: Bearer $ADMIN_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"confirm_token\":\"$slug\"}" >/dev/null || true
|
||||
-d "{\"confirm\":\"$slug\"}" >/dev/null || true
|
||||
done
|
||||
exit 0
|
||||
|
||||
2
.github/workflows/e2e-staging-saas.yml
vendored
2
.github/workflows/e2e-staging-saas.yml
vendored
@ -138,6 +138,6 @@ jobs:
|
||||
curl -sS -X DELETE "$MOLECULE_CP_URL/cp/admin/tenants/$slug" \
|
||||
-H "Authorization: Bearer $ADMIN_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"confirm_token\":\"$slug\"}" >/dev/null || true
|
||||
-d "{\"confirm\":\"$slug\"}" >/dev/null || true
|
||||
done
|
||||
exit 0
|
||||
|
||||
2
.github/workflows/e2e-staging-sanity.yml
vendored
2
.github/workflows/e2e-staging-sanity.yml
vendored
@ -147,6 +147,6 @@ jobs:
|
||||
curl -sS -X DELETE "$MOLECULE_CP_URL/cp/admin/tenants/$slug" \
|
||||
-H "Authorization: Bearer $ADMIN_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"confirm_token\":\"$slug\"}" >/dev/null || true
|
||||
-d "{\"confirm\":\"$slug\"}" >/dev/null || true
|
||||
done
|
||||
exit 0
|
||||
|
||||
@ -45,7 +45,7 @@ export default async function globalTeardown(): Promise<void> {
|
||||
Authorization: `Bearer ${ADMIN_TOKEN}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({ confirm_token: slug }),
|
||||
body: JSON.stringify({ confirm: slug }),
|
||||
});
|
||||
if (res.ok) {
|
||||
console.log(`[staging-teardown] ${slug} deleted`);
|
||||
|
||||
@ -84,7 +84,7 @@ cleanup_org() {
|
||||
curl "${CURL_COMMON[@]}" -X DELETE "$CP_URL/cp/admin/tenants/$SLUG" \
|
||||
-H "Authorization: Bearer $ADMIN_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"confirm_token\":\"$SLUG\"}" >/dev/null 2>&1 \
|
||||
-d "{\"confirm\":\"$SLUG\"}" >/dev/null 2>&1 \
|
||||
&& ok "Teardown request accepted" \
|
||||
|| log "Teardown returned non-2xx (may already be gone)"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user