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 <livio.a@gmail.com>

* feat: add asset tests

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Fabi
2021-04-27 12:58:18 +02:00
committed by GitHub
parent eaf966e3d2
commit f51f0ede5c
102 changed files with 1079 additions and 34 deletions

View File

@@ -119,6 +119,7 @@ func TestCommandSide_AddProjectRole(t *testing.T) {
),
),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key1", "project1")),
),
),
@@ -163,6 +164,7 @@ func TestCommandSide_AddProjectRole(t *testing.T) {
),
),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key1", "project1")),
),
),
@@ -332,6 +334,7 @@ func TestCommandSide_BulkAddProjectRole(t *testing.T) {
),
),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key1", "project1")),
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key2", "project1")),
),
@@ -390,6 +393,7 @@ func TestCommandSide_BulkAddProjectRole(t *testing.T) {
),
),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key1", "project1")),
uniqueConstraintsFromEventConstraint(project.NewAddProjectRoleUniqueConstraint("key2", "project1")),
),
@@ -629,6 +633,7 @@ func TestCommandSide_ChangeProjectRole(t *testing.T) {
newRoleChangedEvent(context.Background(), "project1", "org1", "key1", "keychanged", "groupchanged"),
),
},
nil,
),
),
},
@@ -806,6 +811,7 @@ func TestCommandSide_RemoveProjectRole(t *testing.T) {
),
),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectRoleUniqueConstraint("key1", "project1")),
),
),
@@ -847,6 +853,7 @@ func TestCommandSide_RemoveProjectRole(t *testing.T) {
),
),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectRoleUniqueConstraint("key1", "project1")),
),
),
@@ -905,6 +912,7 @@ func TestCommandSide_RemoveProjectRole(t *testing.T) {
),
),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectRoleUniqueConstraint("key1", "project1")),
),
),
@@ -947,6 +955,7 @@ func TestCommandSide_RemoveProjectRole(t *testing.T) {
),
),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectRoleUniqueConstraint("key1", "project1")),
),
),
@@ -1003,6 +1012,7 @@ func TestCommandSide_RemoveProjectRole(t *testing.T) {
),
),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectRoleUniqueConstraint("key1", "project1")),
),
),