mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 05:37:43 +00:00

# Which Problems Are Solved This PR implements https://github.com/zitadel/zitadel/issues/9850 # How the Problems Are Solved - New protobuf definition - Implementation of retrieval of system translations - Implementation of retrieval and persistence of organization and instance level translations # Additional Context - Closes #9850 # TODO - [x] Integration tests for Get and Set hosted login translation endpoints - [x] DB migration test - [x] Command function tests - [x] Command util functions tests - [x] Query function test - [x] Query util functions tests
37 lines
911 B
Go
37 lines
911 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.WithAuthorization(ctx, integration.UserTypeIAMOwner)
|
|
UserTypeLoginCtx = Instance.WithAuthorization(ctx, integration.UserTypeLogin)
|
|
OrgOwnerCtx = Instance.WithAuthorization(ctx, integration.UserTypeOrgOwner)
|
|
|
|
Client = Instance.Client.SettingsV2
|
|
return m.Run()
|
|
}())
|
|
}
|