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

@@ -179,6 +179,7 @@ func TestCommandSide_AddProjectGrant(t *testing.T) {
[]string{"key1"},
)),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewAddProjectGrantUniqueConstraint("grantedorg1", "project1")),
),
),
@@ -511,6 +512,7 @@ func TestCommandSide_ChangeProjectGrant(t *testing.T) {
[]string{"key1", "key2"},
)),
},
nil,
),
),
},
@@ -591,6 +593,7 @@ func TestCommandSide_ChangeProjectGrant(t *testing.T) {
[]string{"key1"},
)),
},
nil,
),
),
},
@@ -685,6 +688,7 @@ func TestCommandSide_ChangeProjectGrant(t *testing.T) {
[]string{"key1"},
)),
},
nil,
),
),
},
@@ -895,6 +899,7 @@ func TestCommandSide_DeactivateProjectGrant(t *testing.T) {
"projectgrant1",
)),
},
nil,
),
),
},
@@ -1091,6 +1096,7 @@ func TestCommandSide_ReactivateProjectGrant(t *testing.T) {
"projectgrant1",
)),
},
nil,
),
),
},
@@ -1252,6 +1258,7 @@ func TestCommandSide_RemoveProjectGrant(t *testing.T) {
"grantedorg1",
)),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectGrantUniqueConstraint("grantedorg1", "project1")),
),
),
@@ -1298,6 +1305,7 @@ func TestCommandSide_RemoveProjectGrant(t *testing.T) {
"grantedorg1",
)),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectGrantUniqueConstraint("grantedorg1", "project1")),
),
),
@@ -1357,6 +1365,7 @@ func TestCommandSide_RemoveProjectGrant(t *testing.T) {
"projectgrant1",
)),
},
nil,
uniqueConstraintsFromEventConstraint(project.NewRemoveProjectGrantUniqueConstraint("grantedorg1", "project1")),
uniqueConstraintsFromEventConstraint(usergrant.NewRemoveUserGrantUniqueConstraint("org1", "user1", "project1", "projectgrant1")),
),