-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Francesco Ilario <[email protected]>
- Loading branch information
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,7 @@ func TestProxyPublicViewer(t *testing.T) { | |
}{ | ||
"approved user with space": { | ||
proxyClientUser: func() proxyUser { | ||
user := createAppStudioCommunityUser(t, awaitilities, func(sr *SignupRequest) *SignupRequest { | ||
user := createAppStudioRandomUser(t, awaitilities, func(sr *SignupRequest) *SignupRequest { | ||
return sr. | ||
ManuallyApprove(). | ||
EnsureMUR(). | ||
|
@@ -89,7 +89,7 @@ func TestProxyPublicViewer(t *testing.T) { | |
}, | ||
"approved user without space": { | ||
proxyClientUser: func() proxyUser { | ||
user := createAppStudioCommunityUser(t, awaitilities, func(sr *SignupRequest) *SignupRequest { | ||
user := createAppStudioRandomUser(t, awaitilities, func(sr *SignupRequest) *SignupRequest { | ||
return sr. | ||
ManuallyApprove(). | ||
EnsureMUR(). | ||
|
@@ -102,7 +102,7 @@ func TestProxyPublicViewer(t *testing.T) { | |
}, | ||
"not approved user": { | ||
proxyClientUser: func() proxyUser { | ||
user := createAppStudioCommunityUser(t, awaitilities, func(sr *SignupRequest) *SignupRequest { | ||
user := createAppStudioRandomUser(t, awaitilities, func(sr *SignupRequest) *SignupRequest { | ||
return sr. | ||
NoSpace(). | ||
RequireConditions( | ||
|
@@ -290,12 +290,12 @@ func banUser(t *testing.T, hostAwait *wait.HostAwaitility, user proxyUser) { | |
} | ||
} | ||
|
||
func createAppStudioCommunityUser(t *testing.T, awaitilities wait.Awaitilities, withOptions ...func(*SignupRequest) *SignupRequest) *SignupResult { | ||
func createAppStudioRandomUser(t *testing.T, awaitilities wait.Awaitilities, withOptions ...func(*SignupRequest) *SignupRequest) *SignupResult { | ||
suffix := rand.Int31n(999999) // nolint:gosec | ||
sr := NewSignupRequest(awaitilities). | ||
Username(fmt.Sprintf("commuser-%d", suffix)). | ||
Username(fmt.Sprintf("user-%d", suffix)). | ||
IdentityID(uuid.New()). | ||
Email(fmt.Sprintf("communityuser-%[email protected]", suffix)). | ||
Email(fmt.Sprintf("user-%[email protected]", suffix)). | ||
SpaceTier("appstudio"). | ||
RequireConditions(wait.Default()...) | ||
for _, opts := range withOptions { | ||
|