mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-19 09:01:39 -06:00
7c2425a518
* 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>
36 lines
1019 B
TypeScript
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",
|
|
]);
|
|
});
|
|
});
|