Skip to content

Commit

Permalink
remove community user
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Ilario <[email protected]>
  • Loading branch information
filariow committed Sep 25, 2024
1 parent 4dd33cf commit 213786f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/e2e/proxy_publicviewer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand All @@ -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().
Expand All @@ -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(
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 213786f

Please sign in to comment.