mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-11 16:45:13 +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
@@ -50,7 +50,7 @@ func init() {
|
||||
|
||||
func TestBulk(t *testing.T) {
|
||||
iamOwnerCtx := Instance.WithAuthorization(CTX, integration.UserTypeIAMOwner)
|
||||
secondaryOrg := Instance.CreateOrganization(iamOwnerCtx, gofakeit.Name(), gofakeit.Email())
|
||||
secondaryOrg := Instance.CreateOrganization(iamOwnerCtx, integration.OrganizationName(), gofakeit.Email())
|
||||
|
||||
createdSecondaryOrgUser := createHumanUser(t, iamOwnerCtx, secondaryOrg.OrganizationId, 0)
|
||||
bulkMinimalUpdateSecondaryOrgJson := test.Must(json.Marshal(buildMinimalUpdateRequest(createdSecondaryOrgUser.UserId)))
|
||||
|
||||
@@ -32,10 +32,10 @@ func TestMain(m *testing.M) {
|
||||
|
||||
Instance = integration.NewInstance(ctx)
|
||||
|
||||
CTX = Instance.WithAuthorization(ctx, integration.UserTypeOrgOwner)
|
||||
CTX = Instance.WithAuthorizationToken(ctx, integration.UserTypeOrgOwner)
|
||||
|
||||
iamOwnerCtx := Instance.WithAuthorization(CTX, integration.UserTypeIAMOwner)
|
||||
SecondaryOrganization = Instance.CreateOrganization(iamOwnerCtx, gofakeit.Name(), gofakeit.Email())
|
||||
iamOwnerCtx := Instance.WithAuthorizationToken(CTX, integration.UserTypeIAMOwner)
|
||||
SecondaryOrganization = Instance.CreateOrganization(iamOwnerCtx, integration.OrganizationName(), gofakeit.Email())
|
||||
|
||||
return m.Run()
|
||||
}())
|
||||
|
||||
Reference in New Issue
Block a user