Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -28,7 +28,7 @@ vi.mock("~/modules/admin-sso", () => ({
}));
vi.mock("~/modules/admin-sso/logout.server", () => ({
serializeIdTokenCookie: vi.fn((idToken: string) => `admin_sso_id_token=signed:${idToken}; Path=/auth/admin; HttpOnly`),
serializeIdTokenCookie: vi.fn((idToken: string) => `hivegrid_admin_sso_id_token=signed:${idToken}; Path=/auth/admin; HttpOnly`),
}));
vi.mock("~/modules/admin-sso/audit.server", () => ({
@@ -49,7 +49,7 @@ vi.mock("~/utils/db/permissions/userRoles.db.server", () => ({
ensureAdminUserRoleByName: vi.fn(),
}));
vi.mock("@toolctrl/config", () => ({
vi.mock("@hivegrid/config", () => ({
loadRequiredWebConfig: vi.fn(() => ({ routing: { adminAppHost: "admin.example.test" } })),
}));
@@ -76,7 +76,7 @@ const claims = {
subject: "sso-subject-1",
email: "admin@example.test",
name: "Ada Admin",
groups: ["toolctrl-admin"],
groups: ["hivegrid-admin"],
};
function callbackRequest(url = "https://admin.example.test/auth/admin/callback?code=abc&state=state_1") {
@@ -116,7 +116,7 @@ describe("auth admin callback route", () => {
codeVerifier: "verifier_1",
returnTo: "/dashboard",
},
clearCookie: "admin_sso_challenge=; Path=/auth/admin; Max-Age=0",
clearCookie: "hivegrid_admin_sso_challenge=; Path=/auth/admin; Max-Age=0",
} as ReturnType<typeof consumeAdminSsoChallenge>);
vi.mocked(extractAdminSsoClaims).mockReturnValue({ ok: true, claims } as ReturnType<typeof extractAdminSsoClaims>);
vi.mocked(jitProvisionAdmin).mockResolvedValue({
@@ -173,7 +173,7 @@ describe("auth admin callback route", () => {
const response = await expectRedirect(callLoader());
expect(response.status).toBe(302);
expect(response.headers.get("Location")).toBe("/admin/login?error=sso_state_invalid");
expect(response.headers.get("Location")).toBe("/login?error=sso_state_invalid");
const client = await vi.mocked(getAdminSsoClient).mock.results[0]?.value;
expect(client.callback).not.toHaveBeenCalled();
expect(jitProvisionAdmin).not.toHaveBeenCalled();
@@ -196,7 +196,7 @@ describe("auth admin callback route", () => {
codeVerifier: "verifier_1",
returnTo: "https://evil.example.test/steal",
},
clearCookie: "admin_sso_challenge=; Path=/auth/admin; Max-Age=0",
clearCookie: "hivegrid_admin_sso_challenge=; Path=/auth/admin; Max-Age=0",
} as ReturnType<typeof consumeAdminSsoChallenge>);
const response = await callLoader();
@@ -212,8 +212,8 @@ describe("auth admin callback route", () => {
);
const setCookie = response.headers.get("Set-Cookie") ?? "";
expect(setCookie).toContain("app_session=fresh");
expect(setCookie).toContain("admin_sso_challenge=");
expect(setCookie).toContain("admin_sso_id_token=signed:id-token-value");
expect(setCookie).toContain("hivegrid_admin_sso_challenge=");
expect(setCookie).toContain("hivegrid_admin_sso_id_token=signed:id-token-value");
expect(serializeIdTokenCookie).toHaveBeenCalledWith("id-token-value");
expect(writeAdminSsoAuditEvent).toHaveBeenCalledWith(expect.objectContaining({ action: "admin.login.sso.success" }));
});