Chore: Rename integration tests to follow the common convention (#105987)

* automatically rename integration tests to follow the common convention

* name tests differently

* alter column type to bigint

* update another column to bigint

* add another alter

* fix subquery for mysql
This commit is contained in:
Serge Zaitsev
2025-06-29 16:56:24 +02:00
committed by GitHub
parent 4374fe9137
commit f66a693438
64 changed files with 186 additions and 168 deletions
@@ -823,7 +823,7 @@ func TestIntegrationTokenCount(t *testing.T) {
require.Equal(t, int64(0), count)
}
func TestRevokeAllUserTokens(t *testing.T) {
func TestIntegrationRevokeAllUserTokens(t *testing.T) {
t.Run("should not fail if the external sessions could not be removed", func(t *testing.T) {
ctx := createTestContext(t)
usr := &user.User{ID: int64(10)}
@@ -856,7 +856,7 @@ func TestRevokeAllUserTokens(t *testing.T) {
})
}
func TestRevokeToken(t *testing.T) {
func TestIntegrationRevokeToken(t *testing.T) {
t.Run("should not fail if the external sessions could not be removed", func(t *testing.T) {
ctx := createTestContext(t)
usr := &user.User{ID: int64(10)}
@@ -887,7 +887,7 @@ func TestRevokeToken(t *testing.T) {
})
}
func TestBatchRevokeAllUserTokens(t *testing.T) {
func TestIntegrationBatchRevokeAllUserTokens(t *testing.T) {
t.Run("should not fail if the external sessions could not be removed", func(t *testing.T) {
ctx := createTestContext(t)
userIds := []int64{1, 2, 3}
+7 -7
View File
@@ -44,7 +44,7 @@ func TestMain(m *testing.M) {
testsuite.Run(m)
}
func TestVerifyUsingPKIXPublicKeyFile(t *testing.T) {
func TestIntegrationVerifyUsingPKIXPublicKeyFile(t *testing.T) {
key := rsaKeys[0]
unknownKey := rsaKeys[1]
@@ -79,7 +79,7 @@ func TestVerifyUsingPKIXPublicKeyFile(t *testing.T) {
})
}
func TestVerifyUsingJWKSetFile(t *testing.T) {
func TestIntegrationVerifyUsingJWKSetFile(t *testing.T) {
configure := func(t *testing.T, cfg *setting.Cfg) {
t.Helper()
@@ -118,7 +118,7 @@ func TestVerifyUsingJWKSetFile(t *testing.T) {
}, configure)
}
func TestVerifyUsingJWKSetURL(t *testing.T) {
func TestIntegrationVerifyUsingJWKSetURL(t *testing.T) {
t.Run("should refuse to start with non-https URL", func(t *testing.T) {
var err error
@@ -160,7 +160,7 @@ func TestVerifyUsingJWKSetURL(t *testing.T) {
})
}
func TestCachingJWKHTTPResponse(t *testing.T) {
func TestIntegrationCachingJWKHTTPResponse(t *testing.T) {
jwkCachingScenario(t, "caches the jwk response", func(t *testing.T, sc cachingScenarioContext) {
for i := 0; i < 5; i++ {
token := sign(t, &jwKeys[0], jwt.Claims{Subject: subject}, nil)
@@ -200,7 +200,7 @@ func TestCachingJWKHTTPResponse(t *testing.T) {
})
}
func TestSignatureWithNoneAlgorithm(t *testing.T) {
func TestIntegrationSignatureWithNoneAlgorithm(t *testing.T) {
scenario(t, "rejects a token signed with \"none\" algorithm", func(t *testing.T, sc scenarioContext) {
token := signNone(t, jwt.Claims{Subject: "foo"})
_, err := sc.authJWTSvc.Verify(sc.ctx, token)
@@ -208,7 +208,7 @@ func TestSignatureWithNoneAlgorithm(t *testing.T) {
}, configurePKIXPublicKeyFile)
}
func TestClaimValidation(t *testing.T) {
func TestIntegrationClaimValidation(t *testing.T) {
key := rsaKeys[0]
scenario(t, "validates iss field for equality", func(t *testing.T, sc scenarioContext) {
@@ -368,7 +368,7 @@ func jwkCachingScenario(t *testing.T, desc string, fn cachingScenarioFunc, cbs .
})
}
func TestBase64Paddings(t *testing.T) {
func TestIntegrationBase64Paddings(t *testing.T) {
key := rsaKeys[0]
scenario(t, "verifies a token with base64 padding (non compliant rfc7515#section-2 but accepted)", func(t *testing.T, sc scenarioContext) {