diff --git a/pkg/setup/collection_test.go b/pkg/setup/collection_test.go index 8461027d8b2b799074b095916b3e6dd5b90fa488..66c5e25676d51d944681f4c80915600433b2bb99 100644 --- a/pkg/setup/collection_test.go +++ b/pkg/setup/collection_test.go @@ -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())) }) }