fix: rename iam to instance (#3345)

* fix: rename iam command side to instance

* fix: rename iam command side to instance

* fix: rename iam command side to instance

* fix: rename iam command side to instance

* fix: rename orgiampolicy to domain policy

* fix: merge conflicts

* fix: protos

* fix: md files

* implement deprecated org iam policy again

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2022-03-24 17:21:34 +01:00
committed by GitHub
parent 504fe5b761
commit 9d4f296c62
274 changed files with 12073 additions and 11853 deletions

View File

@@ -7,7 +7,7 @@ import (
"github.com/caos/zitadel/internal/eventstore"
"github.com/caos/zitadel/internal/eventstore/handler"
"github.com/caos/zitadel/internal/eventstore/repository"
"github.com/caos/zitadel/internal/repository/iam"
"github.com/caos/zitadel/internal/repository/instance"
)
func TestSMTPConfigProjection_reduces(t *testing.T) {
@@ -24,8 +24,8 @@ func TestSMTPConfigProjection_reduces(t *testing.T) {
name: "reduceSMTPConfigChanged",
args: args{
event: getEvent(testEvent(
repository.EventType(iam.SMTPConfigChangedEventType),
iam.AggregateType,
repository.EventType(instance.SMTPConfigChangedEventType),
instance.AggregateType,
[]byte(`{
"tls": true,
"senderAddress": "sender",
@@ -34,12 +34,12 @@ func TestSMTPConfigProjection_reduces(t *testing.T) {
"user": "user"
}`,
),
), iam.SMTPConfigChangedEventMapper),
), instance.SMTPConfigChangedEventMapper),
},
reduce: (&SMTPConfigProjection{}).reduceSMTPConfigChanged,
want: wantReduce{
projection: SMTPConfigProjectionTable,
aggregateType: eventstore.AggregateType("iam"),
aggregateType: eventstore.AggregateType("instance"),
sequence: 15,
previousSequence: 10,
executer: &testExecuter{
@@ -65,8 +65,8 @@ func TestSMTPConfigProjection_reduces(t *testing.T) {
name: "reduceSMTPConfigAdded",
args: args{
event: getEvent(testEvent(
repository.EventType(iam.SMTPConfigAddedEventType),
iam.AggregateType,
repository.EventType(instance.SMTPConfigAddedEventType),
instance.AggregateType,
[]byte(`{
"tls": true,
"senderAddress": "sender",
@@ -79,12 +79,12 @@ func TestSMTPConfigProjection_reduces(t *testing.T) {
"keyId": "key-id"
}
}`),
), iam.SMTPConfigAddedEventMapper),
), instance.SMTPConfigAddedEventMapper),
},
reduce: (&SMTPConfigProjection{}).reduceSMTPConfigAdded,
want: wantReduce{
projection: SMTPConfigProjectionTable,
aggregateType: eventstore.AggregateType("iam"),
aggregateType: eventstore.AggregateType("instance"),
sequence: 15,
previousSequence: 10,
executer: &testExecuter{
@@ -114,8 +114,8 @@ func TestSMTPConfigProjection_reduces(t *testing.T) {
name: "reduceSMTPConfigPasswordChanged",
args: args{
event: getEvent(testEvent(
repository.EventType(iam.SMTPConfigPasswordChangedEventType),
iam.AggregateType,
repository.EventType(instance.SMTPConfigPasswordChangedEventType),
instance.AggregateType,
[]byte(`{
"password": {
"cryptoType": 0,
@@ -123,12 +123,12 @@ func TestSMTPConfigProjection_reduces(t *testing.T) {
"keyId": "key-id"
}
}`),
), iam.SMTPConfigPasswordChangedEventMapper),
), instance.SMTPConfigPasswordChangedEventMapper),
},
reduce: (&SMTPConfigProjection{}).reduceSMTPConfigPasswordChanged,
want: wantReduce{
projection: SMTPConfigProjectionTable,
aggregateType: eventstore.AggregateType("iam"),
aggregateType: eventstore.AggregateType("instance"),
sequence: 15,
previousSequence: 10,
executer: &testExecuter{