test(status): restore check fixture for gateway auth

This commit is contained in:
Ayaan Zaidi
2026-04-20 11:25:55 +05:30
parent a80874a4c1
commit 212f6ddf8f

View File

@@ -1,6 +1,7 @@
import { describe, expect, it } from "vitest";
import { buildStatusScanResult } from "./status.scan-result.ts";
import { buildColdStartStatusSummary } from "./status.scan.bootstrap-shared.ts";
import type { GatewayProbeSnapshot } from "./status.scan.shared.ts";
describe("buildStatusScanResult", () => {
it("builds the full shared scan result shape", () => {
@@ -15,7 +16,17 @@ describe("buildStatusScanResult", () => {
installKind: "package" as const,
packageManager: "npm" as const,
};
const gatewaySnapshot = {
const gatewaySnapshot: Pick<
GatewayProbeSnapshot,
| "gatewayConnection"
| "remoteUrlMissing"
| "gatewayMode"
| "gatewayProbeAuth"
| "gatewayProbeAuthWarning"
| "gatewayProbe"
| "gatewayReachable"
| "gatewaySelf"
> = {
gatewayConnection: {
url: "ws://127.0.0.1:18789",
urlSource: "config" as const,
@@ -31,6 +42,11 @@ describe("buildStatusScanResult", () => {
connectLatencyMs: 42,
error: null,
close: null,
auth: {
role: "operator",
scopes: ["operator.read"],
capability: "read_only",
},
health: null,
status: null,
presence: null,