Disable kopia-assisted incrementals for OneDrive (#1728)
## Description Do not implement the StreamModTime interface so kopia-assisted incrementals cannot be used for OneDrive. Feature should be reenabled when the following are resolved: * #1702 ## Type of change - [ ] 🌻 Feature - [x] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Test - [ ] 💻 CI/Deployment - [x] 🐹 Trivial/Minor ## Issue(s) * closes #1723 ## Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
09c48c1ec9
commit
0ad6f440ea
@ -31,10 +31,11 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
_ data.Collection = &Collection{}
|
_ data.Collection = &Collection{}
|
||||||
_ data.Stream = &Item{}
|
_ data.Stream = &Item{}
|
||||||
_ data.StreamInfo = &Item{}
|
_ data.StreamInfo = &Item{}
|
||||||
_ data.StreamModTime = &Item{}
|
// TODO(ashmrtn): Uncomment when #1702 is resolved.
|
||||||
|
//_ data.StreamModTime = &Item{}
|
||||||
)
|
)
|
||||||
|
|
||||||
// Collection represents a set of OneDrive objects retreived from M365
|
// Collection represents a set of OneDrive objects retreived from M365
|
||||||
@ -133,9 +134,10 @@ func (od *Item) Info() details.ItemInfo {
|
|||||||
return details.ItemInfo{OneDrive: od.info}
|
return details.ItemInfo{OneDrive: od.info}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (od *Item) ModTime() time.Time {
|
// TODO(ashmrtn): Uncomment when #1702 is resolved.
|
||||||
return od.info.Modified
|
//func (od *Item) ModTime() time.Time {
|
||||||
}
|
// return od.info.Modified
|
||||||
|
//}
|
||||||
|
|
||||||
// populateItems iterates through items added to the collection
|
// populateItems iterates through items added to the collection
|
||||||
// and uses the collection `itemReader` to read the item
|
// and uses the collection `itemReader` to read the item
|
||||||
|
|||||||
@ -107,9 +107,10 @@ func (suite *OneDriveCollectionSuite) TestOneDriveCollection() {
|
|||||||
|
|
||||||
assert.Equal(t, testItemName, readItem.UUID())
|
assert.Equal(t, testItemName, readItem.UUID())
|
||||||
|
|
||||||
require.Implements(t, (*data.StreamModTime)(nil), readItem)
|
// TODO(ashmrtn): Uncomment when #1702 is resolved.
|
||||||
mt := readItem.(data.StreamModTime)
|
// require.Implements(t, (*data.StreamModTime)(nil), readItem)
|
||||||
assert.Equal(t, now, mt.ModTime())
|
// mt := readItem.(data.StreamModTime)
|
||||||
|
// assert.Equal(t, now, mt.ModTime())
|
||||||
|
|
||||||
readData, err := io.ReadAll(readItem.ToReader())
|
readData, err := io.ReadAll(readItem.ToReader())
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user