diff --git a/src/internal/connector/sharepoint/collection.go b/src/internal/connector/sharepoint/collection.go index 8648ce6ce..3f924cded 100644 --- a/src/internal/connector/sharepoint/collection.go +++ b/src/internal/connector/sharepoint/collection.go @@ -66,6 +66,7 @@ func NewCollection( service graph.Servicer, category DataCategory, statusUpdater support.StatusUpdater, + ctrlOpts control.Options, ) *Collection { c := &Collection{ fullPath: folderPath, @@ -74,6 +75,7 @@ func NewCollection( service: service, statusUpdater: statusUpdater, category: category, + ctrl: ctrlOpts, } return c diff --git a/src/internal/connector/sharepoint/collection_test.go b/src/internal/connector/sharepoint/collection_test.go index e072ecaaa..482a6b5be 100644 --- a/src/internal/connector/sharepoint/collection_test.go +++ b/src/internal/connector/sharepoint/collection_test.go @@ -17,6 +17,7 @@ import ( "github.com/alcionai/corso/src/internal/connector/support" "github.com/alcionai/corso/src/internal/data" "github.com/alcionai/corso/src/internal/tester" + "github.com/alcionai/corso/src/pkg/control" "github.com/alcionai/corso/src/pkg/path" ) @@ -73,7 +74,7 @@ func (suite *SharePointCollectionSuite) TestSharePointListCollection() { false) require.NoError(t, err) - col := NewCollection(dir, nil, List, nil) + col := NewCollection(dir, nil, List, nil, control.Options{}) col.data <- &Item{ id: testName, data: io.NopCloser(bytes.NewReader(byteArray)), @@ -100,7 +101,7 @@ func (suite *SharePointCollectionSuite) TestSharePointPageCollection_Populate() defer flush() t := suite.T() - count := 1 + count := 0 siteID := tester.M365SiteID(t) a := tester.NewM365Account(t) account, err := a.M365Config() @@ -122,7 +123,7 @@ func (suite *SharePointCollectionSuite) TestSharePointPageCollection_Populate() ) require.NoError(t, err) - col := NewCollection(dir, service, Pages, nil) + col := NewCollection(dir, service, Pages, nil, control.Defaults()) col.jobs = []string{tuples[0].id} streamChannel := col.Items() diff --git a/src/internal/connector/sharepoint/data_collections.go b/src/internal/connector/sharepoint/data_collections.go index fc5708af9..ba0788422 100644 --- a/src/internal/connector/sharepoint/data_collections.go +++ b/src/internal/connector/sharepoint/data_collections.go @@ -123,7 +123,7 @@ func collectLists( return nil, errors.Wrapf(err, "failed to create collection path for site: %s", siteID) } - collection := NewCollection(dir, serv, List, updater.UpdateStatus) + collection := NewCollection(dir, serv, List, updater.UpdateStatus, ctrlOpts) collection.AddJob(tuple.id) spcs = append(spcs, collection) @@ -197,7 +197,7 @@ func collectPages( return nil, errors.Wrapf(err, "failed to create collection path for site: %s", siteID) } - collection := NewCollection(dir, serv, Pages, updater.UpdateStatus) + collection := NewCollection(dir, serv, Pages, updater.UpdateStatus, ctrlOpts) collection.AddJob(tuple.id) spcs = append(spcs, collection)