mirror of
https://github.com/zitadel/zitadel.git
synced 2025-03-04 03:35:14 +00:00
35 lines
717 B
Go
35 lines
717 B
Go
![]() |
//go:build integration
|
||
|
|
||
|
package saml_test
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"os"
|
||
|
"testing"
|
||
|
"time"
|
||
|
|
||
|
"github.com/zitadel/zitadel/internal/integration"
|
||
|
saml_pb "github.com/zitadel/zitadel/pkg/grpc/saml/v2"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
CTX context.Context
|
||
|
IAMCTX context.Context
|
||
|
Instance *integration.Instance
|
||
|
Client saml_pb.SAMLServiceClient
|
||
|
)
|
||
|
|
||
|
func TestMain(m *testing.M) {
|
||
|
os.Exit(func() int {
|
||
|
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute)
|
||
|
defer cancel()
|
||
|
|
||
|
Instance = integration.NewInstance(ctx)
|
||
|
Client = Instance.Client.SAMLv2
|
||
|
|
||
|
IAMCTX = Instance.WithAuthorization(ctx, integration.UserTypeIAMOwner)
|
||
|
CTX = Instance.WithAuthorization(ctx, integration.UserTypeOrgOwner)
|
||
|
return m.Run()
|
||
|
}())
|
||
|
}
|