Files
openclaw/src/cli/proxy-cli.test.ts
T
Jesse Merhi 7c2425a518 Support HTTPS managed proxy CA trust (#79171)
* fix: support HTTPS managed proxy CA trust

* fix: strip IP SNI for HTTPS proxy dispatchers

* fix: harden managed proxy undici dispatchers

* docs: refresh proxy baselines

* fix: drop stale whatsapp undici dependency

* fix: satisfy proxy dispatcher lint and tests

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-17 06:23:30 +01:00

36 lines
1019 B
TypeScript

import { Command } from "commander";
import { describe, expect, it } from "vitest";
import { registerProxyCli } from "./proxy-cli.js";
describe("proxy cli", () => {
it("registers the debug proxy subcommands", () => {
const program = new Command();
registerProxyCli(program);
const proxy = program.commands.find((command) => command.name() === "proxy");
expect(proxy?.commands.map((command) => command.name())).toEqual([
"start",
"run",
"validate",
"coverage",
"sessions",
"query",
"blob",
"purge",
]);
const validate = proxy?.commands.find((command) => command.name() === "validate");
expect(validate?.description()).toBe("Validate the operator-managed network proxy");
expect(validate?.options.map((option) => option.long)).toEqual([
"--json",
"--proxy-url",
"--proxy-ca-file",
"--allowed-url",
"--denied-url",
"--apns-reachable",
"--apns-authority",
"--timeout-ms",
]);
});
});