From 5d70b4b3a6e4cf60c95bac6997bd4c5c586de496 Mon Sep 17 00:00:00 2001 From: Vaibhav Kamra Date: Wed, 11 Jan 2023 23:40:49 -0800 Subject: [PATCH] Disable kopia incrementals for OneDrive (#2132) ## Description Kopia-assisted incremental backups do not appear to have the correct file size set on restore ## Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No ## Type of change - [ ] :sunflower: Feature - [x] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Test - [ ] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup ## Issue(s) * # ## Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- src/internal/connector/onedrive/collection.go | 14 +++++++------- src/internal/connector/onedrive/collection_test.go | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/internal/connector/onedrive/collection.go b/src/internal/connector/onedrive/collection.go index 22ac8d746..4571b15e2 100644 --- a/src/internal/connector/onedrive/collection.go +++ b/src/internal/connector/onedrive/collection.go @@ -35,10 +35,10 @@ const ( ) var ( - _ data.Collection = &Collection{} - _ data.Stream = &Item{} - _ data.StreamInfo = &Item{} - _ data.StreamModTime = &Item{} + _ data.Collection = &Collection{} + _ data.Stream = &Item{} + _ data.StreamInfo = &Item{} + // _ data.StreamModTime = &Item{} ) // Collection represents a set of OneDrive objects retrieved from M365 @@ -158,9 +158,9 @@ func (od *Item) Info() details.ItemInfo { return od.info } -func (od *Item) ModTime() time.Time { - return od.info.Modified() -} +// func (od *Item) ModTime() time.Time { +// return od.info.Modified() +// } // populateItems iterates through items added to the collection // and uses the collection `itemReader` to read the item diff --git a/src/internal/connector/onedrive/collection_test.go b/src/internal/connector/onedrive/collection_test.go index a19021ff7..66378f09e 100644 --- a/src/internal/connector/onedrive/collection_test.go +++ b/src/internal/connector/onedrive/collection_test.go @@ -179,9 +179,9 @@ func (suite *CollectionUnitTestSuite) TestCollection() { assert.Equal(t, testItemName, readItem.UUID()) - require.Implements(t, (*data.StreamModTime)(nil), readItem) - mt := readItem.(data.StreamModTime) - assert.Equal(t, now, mt.ModTime()) + // require.Implements(t, (*data.StreamModTime)(nil), readItem) + // mt := readItem.(data.StreamModTime) + // assert.Equal(t, now, mt.ModTime()) readData, err := io.ReadAll(readItem.ToReader()) require.NoError(t, err)