Skip to content
Snippets Groups Projects
Commit 5c53f359 authored by ko_oler's avatar ko_oler
Browse files

fix

parent 0ad508c5
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ func TestSetup_InstallCollections(t *testing.T) {
collections []*collections.Collection
collectionsCall func(svc *mockscollections.Collections)
envsCall func(svc *envmocks.Environments)
co CollectionsOption
co []CollectionsOption
force bool
wantErr func(t *testing.T, err error)
}{
......@@ -108,7 +108,7 @@ func TestSetup_InstallCollections(t *testing.T) {
wantErr: func(t *testing.T, err error) {
assert.NoError(t, err)
},
co: UpdateCollectionSchemaMetadata(),
co: []CollectionsOption{UpdateCollectionSchemaMetadata()},
},
{
name: "Fail to update user collection with same id as in extensions collection",
......@@ -120,7 +120,7 @@ func TestSetup_InstallCollections(t *testing.T) {
assert.Error(t, err)
assert.ErrorIs(t, err, collections.ErrAlreadyExists)
},
co: UpdateCollectionSchemaMetadata(),
co: []CollectionsOption{UpdateCollectionSchemaMetadata()},
},
{
name: "Update user collection with same id as in extensions collection with force",
......@@ -136,7 +136,7 @@ func TestSetup_InstallCollections(t *testing.T) {
wantErr: func(t *testing.T, err error) {
assert.NoError(t, err)
},
co: UpdateCollectionSchemaMetadata(),
co: []CollectionsOption{UpdateCollectionSchemaMetadata()},
force: true,
},
{
......@@ -182,7 +182,7 @@ func TestSetup_InstallCollections(t *testing.T) {
}
s := NewSetup(&content.Content{Collections: c, Environments: e}, "sp", "env", nil).WithForce(tt.force)
s.AddCollections(tt.collections, tt.co)
s.AddCollections(tt.collections, tt.co...)
tt.wantErr(t, s.InstallCollections(context.Background()))
})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment