mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-07 06:52:20 +00:00
chore: move gofakeit integration testing calls (#10684)
# Which Problems Are Solved
Flakiness and conflicts in value from gofakeit.
# How the Problems Are Solved
Move Gofakeit calls to the integration package, to guarantee proper
usage and values for integration testing.
# Additional Changes
None
# Additional Context
None
(cherry picked from commit 492f1826ee)
This commit is contained in:
committed by
Livio Spring
parent
78ded99017
commit
b892fc9b28
@@ -13,7 +13,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/brianvoe/gofakeit/v6"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/text/language"
|
||||
@@ -50,7 +49,7 @@ func init() {
|
||||
|
||||
func TestBulk(t *testing.T) {
|
||||
iamOwnerCtx := Instance.WithAuthorization(CTX, integration.UserTypeIAMOwner)
|
||||
secondaryOrg := Instance.CreateOrganization(iamOwnerCtx, integration.OrganizationName(), gofakeit.Email())
|
||||
secondaryOrg := Instance.CreateOrganization(iamOwnerCtx, integration.OrganizationName(), integration.Email())
|
||||
|
||||
createdSecondaryOrgUser := createHumanUser(t, iamOwnerCtx, secondaryOrg.OrganizationId, 0)
|
||||
bulkMinimalUpdateSecondaryOrgJson := test.Must(json.Marshal(buildMinimalUpdateRequest(createdSecondaryOrgUser.UserId)))
|
||||
@@ -480,7 +479,7 @@ func TestBulk(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "fail on errors",
|
||||
body: withUsername(bulkFailOnErrorsJson, gofakeit.Username()),
|
||||
body: withUsername(bulkFailOnErrorsJson, integration.Username()),
|
||||
want: &scim.BulkResponse{
|
||||
Schemas: []schemas.ScimSchemaType{schemas.IdBulkResponse},
|
||||
Operations: []*scim.BulkResponseOperation{
|
||||
@@ -680,7 +679,7 @@ func buildTooManyOperationsRequest() *scim.BulkRequest {
|
||||
req.Operations[i] = &scim.BulkRequestOperation{
|
||||
Method: http.MethodPost,
|
||||
Path: "/Users",
|
||||
Data: withUsername(minimalUserJson, gofakeit.Username()),
|
||||
Data: withUsername(minimalUserJson, integration.Username()),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user