Keep deployment smoke checks backend-only
Foundry Go checks / check (pull_request) Successful in 1m22s
Foundry Go checks / check (push) Successful in 1m21s

This commit is contained in:
2026-11-05 00:57:53 +08:00
parent 17cec9ff06
commit 33719a549b
3 changed files with 4 additions and 11 deletions
+2 -9
View File
@@ -51,15 +51,8 @@ docker exec "$candidate" node -e '
const project = Object.keys(JSON.parse(process.env.FOUNDRY_PROJECTS))[0];
const route = base + "/projects/" + encodeURIComponent(project) + "/auth";
assert.equal((await fetch(route + "/me")).status, 401);
const challenge = require("node:crypto").randomBytes(32).toString("base64url");
const start = await fetch(route + "/google?challenge=" + challenge, {redirect: "manual"});
assert.ok([302, 303].includes(start.status));
const location = new URL(start.headers.get("location"));
assert.equal(location.hostname, "accounts.google.com");
assert.equal(location.searchParams.get("client_id"), process.env.GOOGLE_CLIENT_ID);
assert.equal(location.searchParams.get("redirect_uri"), process.env.PUBLIC_ORIGIN + "/auth/google/callback");
}
verify().catch(() => { console.error("Foundry readiness or OAuth entry check failed"); process.exit(1); });
verify().catch(() => { console.error("Foundry readiness or anonymous access check failed"); process.exit(1); });
'
# Keep the previous running container until the new candidate has passed checks.
@@ -70,4 +63,4 @@ docker rename "$candidate" "$live"
docker update --restart unless-stopped "$live" >/dev/null
bash "$(dirname "$0")/route.sh" "$live"
trap - EXIT
printf 'Foundry readiness, unauthenticated rejection and Google redirect verified.\n'
printf 'Foundry readiness and unauthenticated rejection verified.\n'