feat: add assets to eventstore and event (#1674)

* fix: add assets to eventstore and event

* fix: project member, grant member, app changed tests

* fix: asset migrations

* feat: add asset tests

* feat: add asset tests

* Update internal/eventstore/repository/repository.go

Co-authored-by: Livio Amstutz <[email protected]>

* feat: add asset tests

Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
Fabi
2021-04-27 12:58:18 +02:00
committed by GitHub
co-authored by Livio Amstutz
parent eaf966e3d2
commit f51f0ede5c
102 changed files with 1079 additions and 34 deletions
+11
View File
@@ -158,6 +158,7 @@ func TestCommandSide_AddLoginPolicy(t *testing.T) {
),
),
},
nil,
),
),
tokenVerifier: GetMockVerifier(t, domain.FeatureLoginPolicyUsernameLogin),
@@ -401,6 +402,7 @@ func TestCommandSide_ChangeLoginPolicy(t *testing.T) {
newLoginPolicyChangedEvent(context.Background(), "org1", false, false, false, false, domain.PasswordlessTypeNotAllowed),
),
},
nil,
),
),
tokenVerifier: GetMockVerifier(t, domain.FeatureLoginPolicyUsernameLogin),
@@ -523,6 +525,7 @@ func TestCommandSide_RemoveLoginPolicy(t *testing.T) {
&org.NewAggregate("org1", "org1").Aggregate),
),
},
nil,
),
),
},
@@ -707,6 +710,7 @@ func TestCommandSide_AddIDPProviderLoginPolicy(t *testing.T) {
domain.IdentityProviderTypeOrg),
),
},
nil,
),
),
},
@@ -901,6 +905,7 @@ func TestCommandSide_RemoveIDPProviderLoginPolicy(t *testing.T) {
"config1"),
),
},
nil,
),
),
},
@@ -951,6 +956,7 @@ func TestCommandSide_RemoveIDPProviderLoginPolicy(t *testing.T) {
"config1"),
),
},
nil,
),
),
},
@@ -1020,6 +1026,7 @@ func TestCommandSide_RemoveIDPProviderLoginPolicy(t *testing.T) {
&user.NewAggregate("user1", "org1").Aggregate,
"config1", "externaluser1")),
},
nil,
uniqueConstraintsFromEventConstraint(user.NewRemoveExternalIDPUniqueConstraint("config1", "externaluser1")),
),
),
@@ -1153,6 +1160,7 @@ func TestCommandSide_AddSecondFactorLoginPolicy(t *testing.T) {
domain.SecondFactorTypeOTP),
),
},
nil,
),
),
},
@@ -1302,6 +1310,7 @@ func TestCommandSide_RemoveSecondFactoroginPolicy(t *testing.T) {
domain.SecondFactorTypeOTP),
),
},
nil,
),
),
},
@@ -1420,6 +1429,7 @@ func TestCommandSide_AddMultiFactorLoginPolicy(t *testing.T) {
domain.MultiFactorTypeU2FWithPIN),
),
},
nil,
),
),
},
@@ -1569,6 +1579,7 @@ func TestCommandSide_RemoveMultiFactorLoginPolicy(t *testing.T) {
domain.MultiFactorTypeU2FWithPIN),
),
},
nil,
),
),
},