diff --git a/src/internal/m365/onedrive/collections.go b/src/internal/m365/onedrive/collections.go index 0fa8ec73e..b9373ce4f 100644 --- a/src/internal/m365/onedrive/collections.go +++ b/src/internal/m365/onedrive/collections.go @@ -467,8 +467,8 @@ func (c *Collections) addURLCacheToDriveCollections( uc, err := newURLCache( driveID, urlCacheRefreshInterval, - errs, - c.handler.ItemPager(driveID, "", api.DriveItemSelectDefault())) + c.handler.NewItemPager(driveID, "", api.DriveItemSelectDefault()), + errs) if err != nil { return err } diff --git a/src/internal/m365/onedrive/collections_test.go b/src/internal/m365/onedrive/collections_test.go index f32bdd155..bd63e0668 100644 --- a/src/internal/m365/onedrive/collections_test.go +++ b/src/internal/m365/onedrive/collections_test.go @@ -2700,7 +2700,7 @@ func (suite *OneDriveCollectionsUnitSuite) TestURLCacheIntegration() { suite.Run(test.name, func() { t := suite.T() - ctx, flush := tester.NewContext() + ctx, flush := tester.NewContext(t) defer flush() mbh := mock.DefaultOneDriveBH() diff --git a/src/internal/m365/onedrive/url_cache.go b/src/internal/m365/onedrive/url_cache.go index bb5e61b94..01a36039a 100644 --- a/src/internal/m365/onedrive/url_cache.go +++ b/src/internal/m365/onedrive/url_cache.go @@ -15,11 +15,20 @@ import ( "github.com/alcionai/corso/src/pkg/services/m365/api" ) +type urlCacher interface { + getItemProperties( + ctx context.Context, + itemID string, + ) (itemProps, error) +} + type itemProps struct { downloadURL string isDeleted bool } +var _ urlCacher = &urlCache{} + // urlCache caches download URLs for drive items type urlCache struct { driveID string