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
+48
View File
@@ -15,6 +15,30 @@ 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)
@@ -43,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)
}