mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix: Increase randomness for names used in tests (#3063)
We are starting to run into test flakes due to lack of randomness in CI, this change simply bumps randomness by additional suffix numbers. See: https://github.com/coder/coder/issues/3038#issuecomment-1190283608
This commit is contained in:
committed by
GitHub
parent
87b0b4b1ea
commit
cd74afcccc
@ -271,7 +271,7 @@ func CreateAnotherUser(t *testing.T, client *codersdk.Client, organizationID uui
|
||||
|
||||
func createAnotherUserRetry(t *testing.T, client *codersdk.Client, organizationID uuid.UUID, retries int, roles ...string) *codersdk.Client {
|
||||
req := codersdk.CreateUserRequest{
|
||||
Email: namesgenerator.GetRandomName(1) + "@coder.com",
|
||||
Email: namesgenerator.GetRandomName(10) + "@coder.com",
|
||||
Username: randomUsername(),
|
||||
Password: "testpass",
|
||||
OrganizationID: organizationID,
|
||||
@ -677,7 +677,7 @@ func NewAzureInstanceIdentity(t *testing.T, instanceID string) (x509.VerifyOptio
|
||||
}
|
||||
|
||||
func randomUsername() string {
|
||||
return strings.ReplaceAll(namesgenerator.GetRandomName(0), "_", "-")
|
||||
return strings.ReplaceAll(namesgenerator.GetRandomName(10), "_", "-")
|
||||
}
|
||||
|
||||
// Used to easily create an HTTP transport!
|
||||
|
Reference in New Issue
Block a user