fix(exec-approvals): coerce bare string allowlist entries (#9903) (thanks @mcaxtr)
This commit is contained in:
@@ -53,10 +53,17 @@ async function withEnvOverride<T>(
|
||||
}
|
||||
}
|
||||
|
||||
vi.mock("../gateway/call.js", () => ({
|
||||
callGateway: (opts: unknown) => callGateway(opts),
|
||||
randomIdempotencyKey: () => "rk_test",
|
||||
}));
|
||||
vi.mock(
|
||||
new URL("../../gateway/call.ts", new URL("./gateway-cli/call.ts", import.meta.url)).href,
|
||||
async (importOriginal) => {
|
||||
const mod = await importOriginal();
|
||||
return {
|
||||
...mod,
|
||||
callGateway: (opts: unknown) => callGateway(opts),
|
||||
randomIdempotencyKey: () => "rk_test",
|
||||
};
|
||||
},
|
||||
);
|
||||
|
||||
vi.mock("../gateway/server.js", () => ({
|
||||
startGatewayServer: (port: number, opts?: unknown) => startGatewayServer(port, opts),
|
||||
@@ -122,7 +129,7 @@ describe("gateway-cli coverage", () => {
|
||||
|
||||
expect(callGateway).toHaveBeenCalledTimes(1);
|
||||
expect(runtimeLogs.join("\n")).toContain('"ok": true');
|
||||
}, 30_000);
|
||||
}, 60_000);
|
||||
|
||||
it("registers gateway probe and routes to gatewayStatusCommand", async () => {
|
||||
runtimeLogs.length = 0;
|
||||
@@ -137,7 +144,7 @@ describe("gateway-cli coverage", () => {
|
||||
await program.parseAsync(["gateway", "probe", "--json"], { from: "user" });
|
||||
|
||||
expect(gatewayStatusCommand).toHaveBeenCalledTimes(1);
|
||||
}, 30_000);
|
||||
}, 60_000);
|
||||
|
||||
it("registers gateway discover and prints JSON", async () => {
|
||||
runtimeLogs.length = 0;
|
||||
|
||||
Reference in New Issue
Block a user