Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/server/agentradar-account-pin-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const sse = (events: [string, object][]) => new Response(new ReadableStream({
const rateLimited = (retryAfter: string) => Response.json({ type: "error", error: { type: "rate_limit_error", message: "slow down" } }, { status: 429, headers: { "retry-after": retryAfter } });
let retryAfter = "30";
const fake = Bun.serve({
hostname: "127.0.0.1",
port: 0,
async fetch(req) {
const path = new URL(req.url).pathname;
Expand Down Expand Up @@ -82,7 +83,7 @@ async function startOcx(auth: object, config: object) {
mkdirSync(`${home}/.codex`, { mode: 0o700 });
writeFileSync(`${home}/auth.json`, JSON.stringify(auth), { mode: 0o600 });
writeFileSync(`${home}/codex-accounts.json`, JSON.stringify({ acct1: codexCred(1), acct2: codexCred(2) }), { mode: 0o600 });
const probe = Bun.serve({ port: 0, fetch: () => new Response() });
const probe = Bun.serve({ hostname: "127.0.0.1", port: 0, fetch: () => new Response() });
const port = probe.port;
probe.stop(true);
writeFileSync(`${home}/config.json`, JSON.stringify({ port, hostname: "127.0.0.1", ...config }), { mode: 0o600 });
Expand Down