test(e2e): split auth tests, remove sleep/retry skips, and dedupe security coverage

This commit is contained in:
2026-02-10 17:19:00 +01:00
parent 65109a787c
commit 4d2018b20a
6 changed files with 1647 additions and 1847 deletions

View File

@@ -269,6 +269,13 @@ func skipIfRateLimited(t *testing.T, statusCode int, reason string) {
}
}
func failIfRateLimited(t *testing.T, statusCode int, operation string) {
t.Helper()
if statusCode == http.StatusTooManyRequests {
t.Fatalf("%s was rate limited unexpectedly (429); this test expects deterministic isolation", operation)
}
}
func setupTestContext(t *testing.T) *testContext {
t.Helper()
server := setupIntegrationTestServer(t)
@@ -782,6 +789,11 @@ func (ctx *testContext) resendVerification(t *testing.T, email string) int {
return testutils.ResendVerificationEmail(t, ctx.client, ctx.baseURL, email)
}
func (ctx *testContext) resendVerificationWithIP(t *testing.T, email, ipAddress string) int {
t.Helper()
return testutils.ResendVerificationEmailWithIP(t, ctx.client, ctx.baseURL, email, ipAddress)
}
func (ctx *testContext) createTestFixtures(t *testing.T) *TestFixtures {
t.Helper()
fixtures := &TestFixtures{}