mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-06 17:22:28 +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
@@ -8,7 +8,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/brianvoe/gofakeit/v6"
|
||||
"github.com/muhlemmer/gu"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/zitadel/logging"
|
||||
@@ -939,8 +938,9 @@ func (i *Instance) ActivateProjectGrant(ctx context.Context, t *testing.T, proje
|
||||
return resp
|
||||
}
|
||||
|
||||
func (i *Instance) CreateProjectUserGrant(t *testing.T, ctx context.Context, projectID, userID string) *mgmt.AddUserGrantResponse {
|
||||
resp, err := i.Client.Mgmt.AddUserGrant(ctx, &mgmt.AddUserGrantRequest{
|
||||
func (i *Instance) CreateProjectUserGrant(t *testing.T, ctx context.Context, orgID, projectID, userID string) *mgmt.AddUserGrantResponse {
|
||||
//nolint:staticcheck
|
||||
resp, err := i.Client.Mgmt.AddUserGrant(SetOrgID(ctx, orgID), &mgmt.AddUserGrantRequest{
|
||||
UserId: userID,
|
||||
ProjectId: projectID,
|
||||
})
|
||||
@@ -949,6 +949,7 @@ func (i *Instance) CreateProjectUserGrant(t *testing.T, ctx context.Context, pro
|
||||
}
|
||||
|
||||
func (i *Instance) CreateProjectGrantUserGrant(ctx context.Context, orgID, projectID, projectGrantID, userID string) *mgmt.AddUserGrantResponse {
|
||||
//nolint:staticcheck
|
||||
resp, err := i.Client.Mgmt.AddUserGrant(SetOrgID(ctx, orgID), &mgmt.AddUserGrantRequest{
|
||||
UserId: userID,
|
||||
ProjectId: projectID,
|
||||
@@ -1046,7 +1047,7 @@ func (i *Instance) DeleteProjectGrantMembership(t *testing.T, ctx context.Contex
|
||||
|
||||
func (i *Instance) CreateTarget(ctx context.Context, t *testing.T, name, endpoint string, ty target_domain.TargetType, interrupt bool) *action.CreateTargetResponse {
|
||||
if name == "" {
|
||||
name = gofakeit.Name()
|
||||
name = TargetName()
|
||||
}
|
||||
req := &action.CreateTargetRequest{
|
||||
Name: name,
|
||||
|
||||
Reference in New Issue
Block a user