Skip to content

Commit 95144b8

Browse files
committed
test(auth): pin websocket refresh account
1 parent 9c8bbbf commit 95144b8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎tests/server-auth.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2230,6 +2230,7 @@ describe("server local API auth", () => {
22302230
{ id: "main", email: "[email protected]", isMain: true },
22312231
{ id: "pool-a", email: "[email protected]", isMain: false, chatgptAccountId: "acct-pool-a" },
22322232
],
2233+
codexAccountNamespaces: { "ws-refresh": "pool-a" },
22332234
activeCodexAccountId: "pool-a",
22342235
} as OcxConfig);
22352236
saveCodexAccountCredential("pool-a", {
@@ -2278,10 +2279,10 @@ describe("server local API auth", () => {
22782279
});
22792280

22802281
await waitForOpen;
2281-
ws.send(JSON.stringify({ type: "response.create", model: "gpt-test", input: "hello" }));
2282+
ws.send(JSON.stringify({ type: "response.create", model: "ws-refresh/gpt-test", input: "hello" }));
22822283
await waitForTerminal();
22832284
Date.now = () => now + 180_000;
2284-
ws.send(JSON.stringify({ type: "response.create", model: "gpt-test", input: "again" }));
2285+
ws.send(JSON.stringify({ type: "response.create", model: "ws-refresh/gpt-test", input: "again" }));
22852286
await waitForTerminal();
22862287
ws.close();
22872288

0 commit comments

Comments
 (0)