mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-24 19:35:28 -06:00
58452de711
* refactor(config): retire dead and aliased config keys via doctor migrations * refactor(config): dedupe bundled channel config schemas into shared builders * feat(config): add config-surface count ratchet to doc-baseline check * test(config): drop stale fixtures for retired config keys * fix(doctor): migrate only positive finite MCP timeout aliases * fix(migrate-hermes): emit canonical MCP timeouts only * fix(config): satisfy lint and contract gates
29 lines
1018 B
TypeScript
29 lines
1018 B
TypeScript
// Proxy capture env tests cover environment variable generation for capture sessions.
|
|
import { describe, expect, it } from "vitest";
|
|
import { resolveDebugProxySettings } from "./env.js";
|
|
|
|
const OPENCLAW_DEBUG_PROXY_ENABLED = "OPENCLAW_DEBUG_PROXY_ENABLED";
|
|
const OPENCLAW_DEBUG_PROXY_SESSION_ID = "OPENCLAW_DEBUG_PROXY_SESSION_ID";
|
|
|
|
describe("resolveDebugProxySettings", () => {
|
|
it("keeps an implicit debug proxy session id stable within one process", () => {
|
|
const env = {
|
|
[OPENCLAW_DEBUG_PROXY_ENABLED]: "1",
|
|
} satisfies NodeJS.ProcessEnv;
|
|
|
|
const first = resolveDebugProxySettings(env);
|
|
const second = resolveDebugProxySettings(env);
|
|
|
|
expect(first.sessionId).toBe(second.sessionId);
|
|
});
|
|
|
|
it("prefers an explicit session id from the environment", () => {
|
|
const settings = resolveDebugProxySettings({
|
|
[OPENCLAW_DEBUG_PROXY_ENABLED]: "1",
|
|
[OPENCLAW_DEBUG_PROXY_SESSION_ID]: "session-explicit",
|
|
});
|
|
|
|
expect(settings.sessionId).toBe("session-explicit");
|
|
});
|
|
});
|