test: reset the stored-credential budget between pairing tests

This commit is contained in:
Linus Rath
2026-10-26 16:33:08 +01:00
parent 272fc5e1f4
commit bec17e6a7b
+2
View File
@@ -53,6 +53,7 @@ import { decryptPayload } from '@/lib/auth/crypto';
import { setStalwartAuthContextInStore, type StalwartAuthContext } from '@/lib/stalwart/auth-context';
import { IMPERSONATION_GRANT_COOKIE, sealImpersonationGrant } from '@/lib/impersonation/grant-cookie';
import { resetPairingStoreForTests, stashGrant, type PairingGrant } from '@/lib/auth/pairing-store';
import { resetStoredCredentialBudgetForTests } from '@/lib/stalwart/stored-credential-budget';
import { readPairReauthFromStore, setPairReauthInStore } from '@/lib/auth/pair-reauth';
import { openPhoneRefreshToken } from '@/lib/auth/pair-bundle';
import { POST as createPOST } from '@/app/api/auth/pair/create/route';
@@ -227,6 +228,7 @@ beforeEach(() => {
vi.stubEnv('OAUTH_CLIENT_SECRET', '');
vi.stubEnv('OAUTH_CLIENT_SECRET_FILE', '');
resetPairingStoreForTests();
resetStoredCredentialBudgetForTests();
delete (globalThis as Record<string, unknown>).__bulwarkPairAttempts;
calls.length = 0;
handler = mailServer();