zitadel/internal/api/grpc/admin/information_integration_test.go

37 lines
672 B
Go
Raw Normal View History

//go:build integration
2023-04-25 12:04:35 +00:00
package admin_test
import (
"context"
"os"
"testing"
"time"
"github.com/stretchr/testify/require"
2023-04-25 12:04:35 +00:00
"github.com/zitadel/zitadel/internal/integration"
"github.com/zitadel/zitadel/pkg/grpc/admin"
2023-04-25 12:04:35 +00:00
)
var (
Tester *integration.Tester
)
func TestMain(m *testing.M) {
os.Exit(func() int {
2023-04-28 11:39:53 +00:00
ctx, _, cancel := integration.Contexts(time.Minute)
2023-04-25 12:04:35 +00:00
defer cancel()
Tester = integration.NewTester(ctx)
2023-04-25 12:04:35 +00:00
defer Tester.Done()
return m.Run()
}())
}
func TestServer_Healthz(t *testing.T) {
2023-04-26 16:54:47 +00:00
client := admin.NewAdminServiceClient(Tester.GRPCClientConn)
_, err := client.Healthz(context.TODO(), &admin.HealthzRequest{})
require.NoError(t, err)
}