Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("~/utils/db.server", () => ({
|
||||
db: {
|
||||
@@ -9,6 +9,8 @@ vi.mock("~/utils/db.server", () => ({
|
||||
}));
|
||||
|
||||
describe("web healthz route", () => {
|
||||
afterEach(() => vi.unstubAllEnvs());
|
||||
|
||||
it("returns liveness without touching the database", async () => {
|
||||
const { db } = await import("~/utils/db.server");
|
||||
const { loader } = await import("./healthz");
|
||||
@@ -17,7 +19,7 @@ describe("web healthz route", () => {
|
||||
const body = await response.json();
|
||||
|
||||
expect(response.status).toBe(200);
|
||||
expect(body).toEqual({ status: "ok", service: "web", revision: "unknown" });
|
||||
expect(body).toEqual({ status: "ok", service: "hivegrid-web", surface: "core", revision: "unknown" });
|
||||
expect(db.appConfiguration.count).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -29,4 +31,20 @@ describe("web healthz route", () => {
|
||||
|
||||
await expect(response.json()).resolves.toMatchObject({ revision: "abc1234" });
|
||||
});
|
||||
|
||||
it("reports the isolated portal surface identity", async () => {
|
||||
vi.stubEnv("WEB_RUNTIME_SURFACE", "portal");
|
||||
vi.stubEnv("APP_REVISION", "0123456789abcdef0123456789abcdef01234567");
|
||||
const { loader } = await import("./healthz");
|
||||
|
||||
const response = await loader({ request: new Request("https://kunden.example.com/healthz") });
|
||||
|
||||
await expect(response.json()).resolves.toEqual({
|
||||
status: "ok",
|
||||
service: "hivegrid-portal",
|
||||
surface: "portal",
|
||||
revision: "0123456789abcdef0123456789abcdef01234567",
|
||||
host: "kunden.example.com",
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user