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

fix

parent 0ad508c5
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ func TestSetup_InstallCollections(t *testing.T) { ...@@ -23,7 +23,7 @@ func TestSetup_InstallCollections(t *testing.T) {
collections []*collections.Collection collections []*collections.Collection
collectionsCall func(svc *mockscollections.Collections) collectionsCall func(svc *mockscollections.Collections)
envsCall func(svc *envmocks.Environments) envsCall func(svc *envmocks.Environments)
co CollectionsOption co []CollectionsOption
force bool force bool
wantErr func(t *testing.T, err error) wantErr func(t *testing.T, err error)
}{ }{
...@@ -108,7 +108,7 @@ func TestSetup_InstallCollections(t *testing.T) { ...@@ -108,7 +108,7 @@ func TestSetup_InstallCollections(t *testing.T) {
wantErr: func(t *testing.T, err error) { wantErr: func(t *testing.T, err error) {
assert.NoError(t, err) assert.NoError(t, err)
}, },
co: UpdateCollectionSchemaMetadata(), co: []CollectionsOption{UpdateCollectionSchemaMetadata()},
}, },
{ {
name: "Fail to update user collection with same id as in extensions collection", name: "Fail to update user collection with same id as in extensions collection",
...@@ -120,7 +120,7 @@ func TestSetup_InstallCollections(t *testing.T) { ...@@ -120,7 +120,7 @@ func TestSetup_InstallCollections(t *testing.T) {
assert.Error(t, err) assert.Error(t, err)
assert.ErrorIs(t, err, collections.ErrAlreadyExists) assert.ErrorIs(t, err, collections.ErrAlreadyExists)
}, },
co: UpdateCollectionSchemaMetadata(), co: []CollectionsOption{UpdateCollectionSchemaMetadata()},
}, },
{ {
name: "Update user collection with same id as in extensions collection with force", name: "Update user collection with same id as in extensions collection with force",
...@@ -136,7 +136,7 @@ func TestSetup_InstallCollections(t *testing.T) { ...@@ -136,7 +136,7 @@ func TestSetup_InstallCollections(t *testing.T) {
wantErr: func(t *testing.T, err error) { wantErr: func(t *testing.T, err error) {
assert.NoError(t, err) assert.NoError(t, err)
}, },
co: UpdateCollectionSchemaMetadata(), co: []CollectionsOption{UpdateCollectionSchemaMetadata()},
force: true, force: true,
}, },
{ {
...@@ -182,7 +182,7 @@ func TestSetup_InstallCollections(t *testing.T) { ...@@ -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 := 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())) tt.wantErr(t, s.InstallCollections(context.Background()))
}) })
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment