mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 18:57:32 +00:00
feat: Instance commands (#3385)
* fix: add events for domain * fix: add/remove domain command side * fix: add/remove domain command side * fix: add/remove domain query side * fix: create instance * fix: merge v2 * fix: instance domain * fix: instance domain * fix: instance domain * fix: instance domain * fix: remove domain.IAMID from writemodels * fix: remove domain.IAMID from writemodels * fix: remove domain.IAMID from writemodels * fix: remove domain.IAMID from writemodels * fix: remove domain.IAMID from writemodels * fix: remove domain.IAMID from writemodels * fix: remove domain.IAMID from writemodels * fix: remove domain.IAMID from writemodels * fix: remove domain.IAMID from writemodels * fix: remove domain.IAMID from api * fix: remove domain.IAMID * fix: remove domain.IAMID * fix: add instance domain queries * fix: fix after merge * Update auth_request.go * fix keypair * remove unused code * feat: read instance id from context * feat: remove unused code * feat: use instance id from context * some fixes Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -5,6 +5,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/caos/zitadel/internal/repository/member"
|
||||
"github.com/caos/zitadel/internal/repository/org"
|
||||
"github.com/caos/zitadel/internal/repository/project"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"golang.org/x/text/language"
|
||||
|
||||
@@ -15,9 +18,6 @@ import (
|
||||
"github.com/caos/zitadel/internal/id"
|
||||
"github.com/caos/zitadel/internal/query"
|
||||
"github.com/caos/zitadel/internal/repository/instance"
|
||||
"github.com/caos/zitadel/internal/repository/member"
|
||||
"github.com/caos/zitadel/internal/repository/org"
|
||||
"github.com/caos/zitadel/internal/repository/project"
|
||||
"github.com/caos/zitadel/internal/repository/user"
|
||||
)
|
||||
|
||||
@@ -919,6 +919,7 @@ func TestCommandSide_RemoveUser(t *testing.T) {
|
||||
type (
|
||||
args struct {
|
||||
ctx context.Context
|
||||
instanceID string
|
||||
orgID string
|
||||
userID string
|
||||
cascadeUserMemberships []*query.Membership
|
||||
@@ -1165,7 +1166,7 @@ func TestCommandSide_RemoveUser(t *testing.T) {
|
||||
),
|
||||
eventFromEventPusher(
|
||||
instance.NewMemberCascadeRemovedEvent(context.Background(),
|
||||
&instance.NewAggregate().Aggregate,
|
||||
&instance.NewAggregate("INSTANCE").Aggregate,
|
||||
"user1",
|
||||
),
|
||||
),
|
||||
@@ -1190,7 +1191,7 @@ func TestCommandSide_RemoveUser(t *testing.T) {
|
||||
),
|
||||
},
|
||||
uniqueConstraintsFromEventConstraint(user.NewRemoveUsernameUniqueConstraint("username", "org1", true)),
|
||||
uniqueConstraintsFromEventConstraint(member.NewRemoveMemberUniqueConstraint(domain.IAMID, "user1")),
|
||||
uniqueConstraintsFromEventConstraint(member.NewRemoveMemberUniqueConstraint("INSTANCE", "user1")),
|
||||
uniqueConstraintsFromEventConstraint(member.NewRemoveMemberUniqueConstraint("org1", "user1")),
|
||||
uniqueConstraintsFromEventConstraint(member.NewRemoveMemberUniqueConstraint("project1", "user1")),
|
||||
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectGrantMemberUniqueConstraint("project1", "user1", "grant1")),
|
||||
@@ -1204,7 +1205,7 @@ func TestCommandSide_RemoveUser(t *testing.T) {
|
||||
cascadeUserMemberships: []*query.Membership{
|
||||
{
|
||||
IAM: &query.IAMMembership{
|
||||
IAMID: "IAM",
|
||||
IAMID: "INSTANCE",
|
||||
},
|
||||
UserID: "user1",
|
||||
ResourceOwner: "org1",
|
||||
|
Reference in New Issue
Block a user