File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 } ) ;
You can’t perform that action at this time.
0 commit comments