Skip to content

Commit f44cf0f

Browse files
committed
test: cover multi-account no-replay default
1 parent 4d947ef commit f44cf0f

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

test/index-retry.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,15 @@ describe("OpenAIAuthPlugin rate-limit retry", () => {
446446
delete process.env.CODEX_AUTH_RETRY_ALL_MAX_WAIT_MS;
447447
delete process.env.CODEX_AUTH_RETRY_ALL_MAX_RETRIES;
448448
vi.resetModules();
449+
const secondaryAccount = createMockAccount({
450+
index: 1,
451+
accountId: "account-2",
452+
email: "user2@example.com",
453+
refreshToken: "refresh-token-account-2",
454+
access: "access-token-account-2",
455+
});
456+
accountManagerState.accounts = [createMockAccount(), secondaryAccount];
457+
accountManagerState.accountSelections = [null];
449458

450459
const { OpenAIAuthPlugin } = await import("../index.js");
451460
const client = {
@@ -472,7 +481,7 @@ describe("OpenAIAuthPlugin rate-limit retry", () => {
472481
expect(payload).toEqual({
473482
error: {
474483
message:
475-
"All 1 account(s) are rate-limited. Try again in 1000ms or add another account with `codex login`.",
484+
"All 2 account(s) are rate-limited. Try again in 1000ms or add another account with `codex login`.",
476485
},
477486
});
478487
});

0 commit comments

Comments
 (0)