fix(check): restore gateway status tls mock typing

This commit is contained in:
Vincent Koc
2026-04-06 15:53:01 +01:00
parent 1234c873bc
commit 8fe7b3730f

View File

@@ -1,6 +1,7 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { GatewayProbeResult } from "../gateway/probe.js";
import type { GatewayBonjourBeacon } from "../infra/bonjour-discovery.js";
import type { GatewayTlsRuntime } from "../infra/tls/gateway.js";
import type { RuntimeEnv } from "../runtime.js";
import { withEnvAsync } from "../test-utils/env.js";
@@ -38,11 +39,13 @@ const mocks = vi.hoisted(() => {
stderr: [],
stop: sshStop,
})),
loadGatewayTlsRuntime: vi.fn(async () => ({
enabled: true,
required: true,
fingerprintSha256: "sha256:local-fingerprint",
})),
loadGatewayTlsRuntime: vi.fn(
async (): Promise<GatewayTlsRuntime> => ({
enabled: true,
required: true,
fingerprintSha256: "sha256:local-fingerprint",
}),
),
probeGateway: vi.fn(async (opts: { url: string }): Promise<GatewayProbeResult> => {
const { url } = opts;
if (url.includes("127.0.0.1")) {