mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-04 16:34:04 +00:00
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { resolveCodexPluginAppCacheEndpoint } from "./plugin-app-cache-key.js";
|
|
|
|
describe("resolveCodexPluginAppCacheEndpoint", () => {
|
|
it("keys plugin app inventory by websocket credentials without exposing them", () => {
|
|
const first = resolveCodexPluginAppCacheEndpoint({
|
|
start: {
|
|
transport: "websocket",
|
|
command: "codex",
|
|
args: [],
|
|
url: "ws://127.0.0.1:39175",
|
|
authToken: "token-first",
|
|
headers: { Authorization: "Bearer first" },
|
|
},
|
|
});
|
|
const second = resolveCodexPluginAppCacheEndpoint({
|
|
start: {
|
|
transport: "websocket",
|
|
command: "codex",
|
|
args: [],
|
|
url: "ws://127.0.0.1:39175",
|
|
authToken: "token-second",
|
|
headers: { Authorization: "Bearer second" },
|
|
},
|
|
});
|
|
|
|
expect(first).not.toEqual(second);
|
|
expect(first).not.toContain("token-first");
|
|
expect(first).not.toContain("Bearer first");
|
|
expect(second).not.toContain("token-second");
|
|
expect(second).not.toContain("Bearer second");
|
|
});
|
|
});
|