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

(cherry picked from commit 492f1826ee)
This commit is contained in:
Stefan Benz
2025-09-10 08:00:31 +02:00
committed by Livio Spring
parent 78ded99017
commit b892fc9b28
70 changed files with 1404 additions and 1293 deletions

View File

@@ -11,6 +11,34 @@ func OrganizationName() string {
return company()
}
func Email() string {
return RandString(5) + gofakeit.Email()
}
func Phone() string {
return "+41" + gofakeit.Phone()
}
func FirstName() string {
return gofakeit.FirstName()
}
func LastName() string {
return gofakeit.LastName()
}
func Username() string {
return gofakeit.Username() + RandString(5)
}
func Language() string {
return gofakeit.LanguageBCP()
}
func UserSchemaName() string {
return gofakeit.Name() + RandString(5)
}
// appName private function to add a random string to the gofakeit.AppName function
func appName() string {
return gofakeit.AppName() + "-" + RandString(5)
@@ -39,3 +67,27 @@ func RoleKey() string {
func RoleDisplayName() string {
return appName()
}
func DomainName() string {
return RandString(5) + gofakeit.DomainName()
}
func URL() string {
return gofakeit.URL()
}
func RelayState() string {
return ID()
}
func ID() string {
return RandString(20)
}
func Slogan() string {
return gofakeit.Slogan()
}
func Number() int {
return gofakeit.Number(0, 1_000_000)
}