chore: move gofakeit integration testing calls (#10684)

# Which Problems Are Solved

Flakiness and conflicts in value from gofakeit.

# How the Problems Are Solved

Move Gofakeit calls to the integration package, to guarantee proper
usage and values for integration testing.

# Additional Changes

None

# Additional Context

None
This commit is contained in:
Stefan Benz
2025-09-10 09:00:31 +03:00
committed by GitHub
parent b9b9baf67f
commit 492f1826ee
71 changed files with 1083 additions and 980 deletions
@@ -7,7 +7,6 @@ import (
"testing"
"time"
"github.com/brianvoe/gofakeit/v6"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -97,12 +96,12 @@ func TestServer_AddSecret(t *testing.T) {
}
func TestServer_AddSecret_Permission(t *testing.T) {
otherOrg := Instance.CreateOrganization(IamCTX, integration.OrganizationName(), gofakeit.Email())
otherOrg := Instance.CreateOrganization(IamCTX, integration.OrganizationName(), integration.Email())
otherOrgUser, err := Instance.Client.UserV2.CreateUser(IamCTX, &user.CreateUserRequest{
OrganizationId: otherOrg.OrganizationId,
UserType: &user.CreateUserRequest_Machine_{
Machine: &user.CreateUserRequest_Machine{
Name: gofakeit.Name(),
Name: integration.Username(),
},
},
})
@@ -244,12 +243,12 @@ func TestServer_RemoveSecret(t *testing.T) {
}
func TestServer_RemoveSecret_Permission(t *testing.T) {
otherOrg := Instance.CreateOrganization(IamCTX, integration.OrganizationName(), gofakeit.Email())
otherOrg := Instance.CreateOrganization(IamCTX, integration.OrganizationName(), integration.Email())
otherOrgUser, err := Instance.Client.UserV2.CreateUser(IamCTX, &user.CreateUserRequest{
OrganizationId: otherOrg.OrganizationId,
UserType: &user.CreateUserRequest_Machine_{
Machine: &user.CreateUserRequest_Machine{
Name: gofakeit.Name(),
Name: integration.Username(),
},
},
})