mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-28 18:33:37 +00:00
fix: stabilize full gate
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { SecretInput } from "../config/types.secrets.js";
|
||||
import { encodePairingSetupCode, resolvePairingSetupFromConfig } from "./setup-code.js";
|
||||
|
||||
vi.mock("../infra/device-bootstrap.js", () => ({
|
||||
issueDeviceBootstrapToken: vi.fn(async () => ({
|
||||
@@ -9,6 +8,9 @@ vi.mock("../infra/device-bootstrap.js", () => ({
|
||||
})),
|
||||
}));
|
||||
|
||||
let encodePairingSetupCode: typeof import("./setup-code.js").encodePairingSetupCode;
|
||||
let resolvePairingSetupFromConfig: typeof import("./setup-code.js").resolvePairingSetupFromConfig;
|
||||
|
||||
describe("pairing setup code", () => {
|
||||
type ResolvedSetup = Awaited<ReturnType<typeof resolvePairingSetupFromConfig>>;
|
||||
const defaultEnvSecretProviderConfig = {
|
||||
@@ -68,10 +70,17 @@ describe("pairing setup code", () => {
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
vi.resetModules();
|
||||
vi.stubEnv("OPENCLAW_GATEWAY_TOKEN", "");
|
||||
vi.stubEnv("CLAWDBOT_GATEWAY_TOKEN", "");
|
||||
vi.stubEnv("OPENCLAW_GATEWAY_PASSWORD", "");
|
||||
vi.stubEnv("CLAWDBOT_GATEWAY_PASSWORD", "");
|
||||
vi.stubEnv("OPENCLAW_GATEWAY_PORT", "");
|
||||
vi.stubEnv("CLAWDBOT_GATEWAY_PORT", "");
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
({ encodePairingSetupCode, resolvePairingSetupFromConfig } = await import("./setup-code.js"));
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user