mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 12:57:34 +00:00
chore: fix flakiness in gofakeit usage with additional random string (#10385)
# Which Problems Are Solved Flakiness in integration tests regarding gofakeit functions, which provided the same names on 2 different occasions. # How the Problems Are Solved Attach a random string to the provided names, so that they are not dependent on the gofakeit code. # Additional Changes None # Additional Context None --------- Co-authored-by: Marco A. <marco@zitadel.com>
This commit is contained in:
@@ -4,7 +4,6 @@ package user_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"slices"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -110,7 +109,7 @@ func TestServer_AddPersonalAccessToken(t *testing.T) {
|
||||
|
||||
func TestServer_AddPersonalAccessToken_Permission(t *testing.T) {
|
||||
OrgCTX := CTX
|
||||
otherOrg := Instance.CreateOrganization(IamCTX, fmt.Sprintf("AddPersonalAccessToken-%s", gofakeit.AppName()), gofakeit.Email())
|
||||
otherOrg := Instance.CreateOrganization(IamCTX, integration.OrganizationName(), gofakeit.Email())
|
||||
otherOrgUser, err := Client.CreateUser(IamCTX, &user.CreateUserRequest{
|
||||
OrganizationId: otherOrg.OrganizationId,
|
||||
UserType: &user.CreateUserRequest_Machine_{
|
||||
@@ -249,7 +248,7 @@ func TestServer_RemovePersonalAccessToken(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestServer_RemovePersonalAccessToken_Permission(t *testing.T) {
|
||||
otherOrg := Instance.CreateOrganization(IamCTX, fmt.Sprintf("RemovePersonalAccessToken-%s", gofakeit.AppName()), gofakeit.Email())
|
||||
otherOrg := Instance.CreateOrganization(IamCTX, integration.OrganizationName(), gofakeit.Email())
|
||||
otherOrgUser, err := Client.CreateUser(IamCTX, &user.CreateUserRequest{
|
||||
OrganizationId: otherOrg.OrganizationId,
|
||||
UserType: &user.CreateUserRequest_Machine_{
|
||||
@@ -328,7 +327,7 @@ func TestServer_ListPersonalAccessTokens(t *testing.T) {
|
||||
want *user.ListPersonalAccessTokensResponse
|
||||
}
|
||||
OrgCTX := CTX
|
||||
otherOrg := Instance.CreateOrganization(SystemCTX, fmt.Sprintf("ListPersonalAccessTokens-%s", gofakeit.AppName()), gofakeit.Email())
|
||||
otherOrg := Instance.CreateOrganization(SystemCTX, integration.OrganizationName(), gofakeit.Email())
|
||||
otherOrgUser, err := Client.CreateUser(SystemCTX, &user.CreateUserRequest{
|
||||
OrganizationId: otherOrg.OrganizationId,
|
||||
UserType: &user.CreateUserRequest_Machine_{
|
||||
|
Reference in New Issue
Block a user