mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
31 lines
533 B
Go
31 lines
533 B
Go
|
//go:build integration
|
||
|
|
||
|
package handlers_test
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"os"
|
||
|
"testing"
|
||
|
"time"
|
||
|
|
||
|
"github.com/zitadel/zitadel/internal/integration"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
CTX context.Context
|
||
|
SystemCTX context.Context
|
||
|
Tester *integration.Tester
|
||
|
)
|
||
|
|
||
|
func TestMain(m *testing.M) {
|
||
|
os.Exit(func() int {
|
||
|
ctx, _, cancel := integration.Contexts(5 * time.Minute)
|
||
|
CTX = ctx
|
||
|
defer cancel()
|
||
|
Tester = integration.NewTester(ctx)
|
||
|
SystemCTX = Tester.WithAuthorization(ctx, integration.SystemUser)
|
||
|
defer Tester.Done()
|
||
|
return m.Run()
|
||
|
}())
|
||
|
}
|