mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-14 01:45:12 +00:00
chore: use integration package for name generation (#10591)
# Which Problems Are Solved Integration test failed sometimes with `organization already exists`-errors. # How the Problems Are Solved Use a consistent function to generate name used for organization creation. # Additional Changes Correct a eventual consistent test for username around organization domain changes with eventual consistent loop. # Additional Context None --------- Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
parent
832e78f9bc
commit
5721b63bcb
@@ -123,7 +123,7 @@ func Test_ZITADEL_API_missing_authentication(t *testing.T) {
|
||||
|
||||
func Test_ZITADEL_API_missing_mfa_policy(t *testing.T) {
|
||||
clientID, _ := createClient(t, Instance)
|
||||
org := Instance.CreateOrganization(CTXIAM, fmt.Sprintf("ZITADEL_API_MISSING_MFA_%s", gofakeit.AppName()), gofakeit.Email())
|
||||
org := Instance.CreateOrganization(CTXIAM, integration.OrganizationName(), gofakeit.Email())
|
||||
userID := org.CreatedAdmins[0].GetUserId()
|
||||
Instance.SetUserPassword(CTXIAM, userID, integration.UserPassword, false)
|
||||
authRequestID := createAuthRequest(t, Instance, clientID, redirectURI, oidc.ScopeOpenID, zitadelAudienceScope)
|
||||
|
||||
@@ -296,7 +296,7 @@ func addProjectRolesGrants(t *testing.T, userID, projectID string, roles ...stri
|
||||
// addProjectOrgGrant adds a new organization which will be granted on the projectID with the specified roles.
|
||||
// The userID will be granted in the new organization to the project with the same roles.
|
||||
func addProjectOrgGrant(t *testing.T, userID, projectID string, roles ...string) (grantedOrgID string) {
|
||||
grantedOrg := Instance.CreateOrganization(CTXIAM, fmt.Sprintf("ZITADEL_GRANTED_%s", gofakeit.AppName()), gofakeit.Email())
|
||||
grantedOrg := Instance.CreateOrganization(CTXIAM, integration.OrganizationName(), gofakeit.Email())
|
||||
projectGrant, err := Instance.Client.Mgmt.AddProjectGrant(CTX, &management.AddProjectGrantRequest{
|
||||
ProjectId: projectID,
|
||||
GrantedOrgId: grantedOrg.GetOrganizationId(),
|
||||
|
||||
Reference in New Issue
Block a user