mirror of
https://github.com/zitadel/zitadel.git
synced 2025-11-15 03:06:02 +00:00
feat: port reduction (#323)
* move mgmt pkg * begin package restructure * rename auth package to authz * begin start api * move auth * move admin * fix merge * configs and interceptors * interceptor * revert generate-grpc.sh * some cleanups * console * move console * fix tests and merging * js linting * merge * merging and configs * change k8s base to current ports * fixes * cleanup * regenerate proto * remove unnecessary whitespace * missing param * go mod tidy * fix merging * move login pkg * cleanup * move api pkgs again * fix pkg naming * fix generate-static.sh for login * update workflow * fixes * logging * remove duplicate * comment for optional gateway interfaces * regenerate protos * fix proto imports for grpc web * protos * grpc web generate * grpc web generate * fix changes * add translation interceptor * fix merging * regenerate mgmt proto
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/caos/zitadel/internal/api/auth"
|
||||
"github.com/caos/zitadel/internal/api/authz"
|
||||
caos_errs "github.com/caos/zitadel/internal/errors"
|
||||
"github.com/caos/zitadel/internal/eventstore/models"
|
||||
policy_model "github.com/caos/zitadel/internal/policy/model"
|
||||
@@ -81,7 +81,7 @@ func TestPasswordAgePolicyAggregate(t *testing.T) {
|
||||
{
|
||||
name: "create aggregate",
|
||||
args: args{
|
||||
ctx: auth.NewMockContext("orgID", "userID"),
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
aggCreator: models.NewAggregateCreator("Test"),
|
||||
policy: &PasswordAgePolicy{ObjectRoot: models.ObjectRoot{AggregateID: "AggregateID", Sequence: 1}, Description: "Test"},
|
||||
},
|
||||
@@ -93,7 +93,7 @@ func TestPasswordAgePolicyAggregate(t *testing.T) {
|
||||
{
|
||||
name: "policy nil",
|
||||
args: args{
|
||||
ctx: auth.NewMockContext("orgID", "userID"),
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
aggCreator: models.NewAggregateCreator("Test"),
|
||||
},
|
||||
res: res{
|
||||
@@ -142,7 +142,7 @@ func TestPasswordAgePolicyCreateAggregate(t *testing.T) {
|
||||
{
|
||||
name: "policy update aggregate ok",
|
||||
args: args{
|
||||
ctx: auth.NewMockContext("orgID", "userID"),
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
new: &PasswordAgePolicy{ObjectRoot: models.ObjectRoot{AggregateID: "AggregateID"}, Description: "PolicyName", State: int32(policy_model.PolicyStateActive)},
|
||||
aggCreator: models.NewAggregateCreator("Test"),
|
||||
},
|
||||
@@ -154,7 +154,7 @@ func TestPasswordAgePolicyCreateAggregate(t *testing.T) {
|
||||
{
|
||||
name: "new policy nil",
|
||||
args: args{
|
||||
ctx: auth.NewMockContext("orgID", "userID"),
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
new: nil,
|
||||
aggCreator: models.NewAggregateCreator("Test"),
|
||||
},
|
||||
@@ -207,7 +207,7 @@ func TestPasswordAgePolicyUpdateAggregate(t *testing.T) {
|
||||
{
|
||||
name: "policy update aggregate ok",
|
||||
args: args{
|
||||
ctx: auth.NewMockContext("orgID", "userID"),
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
existing: &PasswordAgePolicy{ObjectRoot: models.ObjectRoot{AggregateID: "AggregateID"}, Description: "PolicyName", State: int32(policy_model.PolicyStateActive)},
|
||||
new: &PasswordAgePolicy{ObjectRoot: models.ObjectRoot{AggregateID: "AggregateID"}, Description: "PolicyName_Changed", State: int32(policy_model.PolicyStateActive)},
|
||||
aggCreator: models.NewAggregateCreator("Test"),
|
||||
@@ -220,7 +220,7 @@ func TestPasswordAgePolicyUpdateAggregate(t *testing.T) {
|
||||
{
|
||||
name: "existing policy nil",
|
||||
args: args{
|
||||
ctx: auth.NewMockContext("orgID", "userID"),
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
existing: nil,
|
||||
aggCreator: models.NewAggregateCreator("Test"),
|
||||
},
|
||||
@@ -234,7 +234,7 @@ func TestPasswordAgePolicyUpdateAggregate(t *testing.T) {
|
||||
{
|
||||
name: "new policy nil",
|
||||
args: args{
|
||||
ctx: auth.NewMockContext("orgID", "userID"),
|
||||
ctx: authz.NewMockContext("orgID", "userID"),
|
||||
existing: &PasswordAgePolicy{ObjectRoot: models.ObjectRoot{AggregateID: "AggregateID"}, Description: "ProjectName", State: int32(policy_model.PolicyStateActive)},
|
||||
new: nil,
|
||||
aggCreator: models.NewAggregateCreator("Test"),
|
||||
|
||||
Reference in New Issue
Block a user