test(e2e): split auth tests, remove sleep/retry skips, and dedupe security coverage
This commit is contained in:
@@ -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{}
|
||||
|
||||
Reference in New Issue
Block a user