mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:40:44 +00:00
test(status): restore check fixture for gateway auth
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user