mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-23 13:28:45 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user