mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:57:32 +00:00

# 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>
37 lines
926 B
Go
37 lines
926 B
Go
//go:build integration
|
|
|
|
package settings_test
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/zitadel/zitadel/internal/integration"
|
|
"github.com/zitadel/zitadel/pkg/grpc/settings/v2"
|
|
)
|
|
|
|
var (
|
|
CTX, AdminCTX, UserTypeLoginCtx, OrgOwnerCtx context.Context
|
|
Instance *integration.Instance
|
|
Client settings.SettingsServiceClient
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
os.Exit(func() int {
|
|
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute)
|
|
defer cancel()
|
|
|
|
Instance = integration.NewInstance(ctx)
|
|
|
|
CTX = ctx
|
|
AdminCTX = Instance.WithAuthorizationToken(ctx, integration.UserTypeIAMOwner)
|
|
UserTypeLoginCtx = Instance.WithAuthorizationToken(ctx, integration.UserTypeLogin)
|
|
OrgOwnerCtx = Instance.WithAuthorizationToken(ctx, integration.UserTypeOrgOwner)
|
|
|
|
Client = Instance.Client.SettingsV2
|
|
return m.Run()
|
|
}())
|
|
}
|