mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 20:38:00 +00:00
35 lines
642 B
Go
35 lines
642 B
Go
|
//go:build integration
|
||
|
|
||
|
package management_test
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"os"
|
||
|
"testing"
|
||
|
"time"
|
||
|
|
||
|
"github.com/zitadel/zitadel/internal/integration"
|
||
|
mgmt_pb "github.com/zitadel/zitadel/pkg/grpc/management"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
CTX, OrgCTX context.Context
|
||
|
Tester *integration.Tester
|
||
|
Client mgmt_pb.ManagementServiceClient
|
||
|
)
|
||
|
|
||
|
func TestMain(m *testing.M) {
|
||
|
os.Exit(func() int {
|
||
|
ctx, _, cancel := integration.Contexts(3 * time.Minute)
|
||
|
defer cancel()
|
||
|
|
||
|
Tester = integration.NewTester(ctx)
|
||
|
defer Tester.Done()
|
||
|
|
||
|
CTX = ctx
|
||
|
OrgCTX = Tester.WithAuthorization(ctx, integration.OrgOwner)
|
||
|
Client = Tester.Client.Mgmt
|
||
|
return m.Run()
|
||
|
}())
|
||
|
}
|