Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -46,7 +46,7 @@ function startLoginServer() {
if (req.method === "GET" && req.url === "/login") {
res.writeHead(200, {
"content-type": "text/html",
"set-cookie": "hivegrid_session=seed-cookie; Path=/; HttpOnly",
"set-cookie": "__Host-hivegrid_app_session=seed-cookie; Path=/; HttpOnly; Secure",
});
res.end('<form><input value="csrf-token-123" name="csrf" type="hidden"></form>');
return;
@@ -62,14 +62,14 @@ function startLoginServer() {
try {
const params = new URLSearchParams(body);
assert.equal(req.headers["x-csrf-token"], "csrf-token-123");
assert.equal(req.headers.cookie, "hivegrid_session=seed-cookie");
assert.equal(req.headers.cookie, "__Host-hivegrid_app_session=seed-cookie");
assert.equal(params.get("action"), "login");
assert.equal(params.get("csrf"), "csrf-token-123");
assert.equal(params.get("email"), "lighthouse@example.test");
assert.equal(params.get("password"), "super-secret-password");
res.writeHead(302, {
location: "/",
"set-cookie": "hivegrid_session=fresh-cookie; Path=/; HttpOnly; Secure",
"set-cookie": "__Host-hivegrid_app_session=fresh-cookie; Path=/; HttpOnly; Secure",
});
res.end();
} catch (error) {
@@ -112,23 +112,23 @@ describe("rotate-lighthouse-session-cookie", () => {
try {
const result = await spawnScript({
...process.env,
GITHUB_ENV: githubEnv,
LIGHTHOUSE_LOGIN_URL: server.url,
LIGHTHOUSE_LOGIN_EMAIL: "lighthouse@example.test",
LIGHTHOUSE_LOGIN_PASSWORD: "super-secret-password",
LIGHTHOUSE_SESSION_COOKIE_NAME: "hivegrid_session",
LIGHTHOUSE_COOKIE_DOMAIN: "app.hivegrid.de",
...process.env,
GITHUB_ENV: githubEnv,
LIGHTHOUSE_LOGIN_URL: server.url,
LIGHTHOUSE_LOGIN_EMAIL: "lighthouse@example.test",
LIGHTHOUSE_LOGIN_PASSWORD: "super-secret-password",
LIGHTHOUSE_SESSION_COOKIE_NAME: "__Host-hivegrid_app_session",
LIGHTHOUSE_COOKIE_DOMAIN: "app.hivegrid.de",
});
assert.equal(result.status, 0, result.stderr);
assert.match(result.stdout, /Minted Lighthouse session cookie hivegrid_session/);
assert.match(result.stdout, /Minted Lighthouse session cookie __Host-hivegrid_app_session/);
assert.doesNotMatch(result.stdout, /fresh-cookie|super-secret-password/);
assert.doesNotMatch(result.stderr, /fresh-cookie|super-secret-password/);
const envFile = fs.readFileSync(githubEnv, "utf8");
assert.match(envFile, /^LIGHTHOUSE_SESSION_COOKIE=fresh-cookie$/m);
assert.match(envFile, /^LIGHTHOUSE_SESSION_COOKIE_NAME=hivegrid_session$/m);
assert.match(envFile, /^LIGHTHOUSE_SESSION_COOKIE_NAME=__Host-hivegrid_app_session$/m);
assert.match(envFile, /^LIGHTHOUSE_COOKIE_DOMAIN=app\.hivegrid\.de$/m);
assert.equal(server.requests.length, 2);
assert.deepEqual(server.assertionErrors, []);
@@ -164,12 +164,12 @@ describe("rotate-lighthouse-session-cookie", () => {
LIGHTHOUSE_LOGIN_EMAIL: "",
LIGHTHOUSE_LOGIN_PASSWORD: "",
LIGHTHOUSE_SESSION_COOKIE: "existing-cookie",
LIGHTHOUSE_SESSION_COOKIE_NAME: "hivegrid_session",
LIGHTHOUSE_SESSION_COOKIE_NAME: "__Host-hivegrid_app_session",
},
});
assert.equal(result.status, 0, result.stderr);
assert.match(result.stdout, /Using pre-provisioned Lighthouse session cookie hivegrid_session/);
assert.match(result.stdout, /Using pre-provisioned Lighthouse session cookie __Host-hivegrid_app_session/);
assert.doesNotMatch(result.stdout, /existing-cookie/);
assert.match(fs.readFileSync(githubEnv, "utf8"), /^LIGHTHOUSE_SESSION_COOKIE=existing-cookie$/m);
});