From a1e1ebb5c32f30458996d1c225ec06fbdab007db Mon Sep 17 00:00:00 2001 From: Danny Adams Date: Tue, 10 Jan 2023 18:52:19 -0500 Subject: [PATCH] Mock Service added back to test. --- .../connector/sharepoint/data_collections_test.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/internal/connector/sharepoint/data_collections_test.go b/src/internal/connector/sharepoint/data_collections_test.go index c4f976e4d..944a24988 100644 --- a/src/internal/connector/sharepoint/data_collections_test.go +++ b/src/internal/connector/sharepoint/data_collections_test.go @@ -41,17 +41,20 @@ func (fm testFolderMatcher) Matches(path string) bool { type SharePointLibrariesSuite struct { suite.Suite + mockService mockServicer } -func (suite *SharePointLibrariesSuite) Client() *msgraphsdk.GraphServiceClient { +type mockServicer struct{} + +func (mock mockServicer) Client() *msgraphsdk.GraphServiceClient { return nil } -func (suite *SharePointLibrariesSuite) Adapter() *msgraphsdk.GraphRequestAdapter { +func (mock mockServicer) Adapter() *msgraphsdk.GraphRequestAdapter { return nil } -func (suite *SharePointLibrariesSuite) Serialize(object absser.Parsable) ([]byte, error) { +func (mock mockServicer) Serialize(object absser.Parsable) ([]byte, error) { return nil, nil } @@ -106,7 +109,7 @@ func (suite *SharePointLibrariesSuite) TestUpdateCollections() { site, onedrive.SharePointSource, testFolderMatcher{test.scope}, - suite, + suite.mockService, nil, control.Options{}) err := c.UpdateCollections(ctx, "driveID", test.items)