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
@@ -6,7 +6,6 @@ import (
"testing"
"time"
"github.com/brianvoe/gofakeit/v6"
"github.com/google/uuid"
"github.com/stretchr/testify/require"
@@ -81,15 +80,15 @@ func TestServer_ImportData(t *testing.T) {
{
UserId: userIDs[0],
User: &management.ImportHumanUserRequest{
UserName: gofakeit.Username(),
UserName: integration.Username(),
Profile: &management.ImportHumanUserRequest_Profile{
FirstName: gofakeit.FirstName(),
LastName: gofakeit.LastName(),
DisplayName: gofakeit.Username(),
PreferredLanguage: gofakeit.LanguageBCP(),
FirstName: integration.FirstName(),
LastName: integration.LastName(),
DisplayName: integration.Username(),
PreferredLanguage: integration.Language(),
},
Email: &management.ImportHumanUserRequest_Email{
Email: gofakeit.Email(),
Email: integration.Email(),
IsEmailVerified: true,
},
},
@@ -97,15 +96,15 @@ func TestServer_ImportData(t *testing.T) {
{
UserId: userIDs[1],
User: &management.ImportHumanUserRequest{
UserName: gofakeit.Username(),
UserName: integration.Username(),
Profile: &management.ImportHumanUserRequest_Profile{
FirstName: gofakeit.FirstName(),
LastName: gofakeit.LastName(),
DisplayName: gofakeit.Username(),
PreferredLanguage: gofakeit.LanguageBCP(),
FirstName: integration.FirstName(),
LastName: integration.LastName(),
DisplayName: integration.Username(),
PreferredLanguage: integration.Language(),
},
Email: &management.ImportHumanUserRequest_Email{
Email: gofakeit.Email(),
Email: integration.Email(),
IsEmailVerified: true,
},
},
@@ -408,15 +407,15 @@ func TestServer_ImportData(t *testing.T) {
{
UserId: userIDs[2],
User: &management.ImportHumanUserRequest{
UserName: gofakeit.Username(),
UserName: integration.Username(),
Profile: &management.ImportHumanUserRequest_Profile{
FirstName: gofakeit.FirstName(),
LastName: gofakeit.LastName(),
DisplayName: gofakeit.Username(),
PreferredLanguage: gofakeit.LanguageBCP(),
FirstName: integration.FirstName(),
LastName: integration.LastName(),
DisplayName: integration.Username(),
PreferredLanguage: integration.Language(),
},
Email: &management.ImportHumanUserRequest_Email{
Email: gofakeit.Email(),
Email: integration.Email(),
IsEmailVerified: true,
},
},