use prevPath in data.Collection (#1943)
## Type of change - [x] 🐛 Bugfix ## Issue(s) * #1777 ## Test Plan - [x] 💪 Manual
This commit is contained in:
parent
a1444f529e
commit
73c4937456
@ -158,7 +158,7 @@ func (col *Collection) FullPath() path.Path {
|
||||
// TODO(ashmrtn): Fill in with previous path once GraphConnector compares old
|
||||
// and new folder hierarchies.
|
||||
func (col Collection) PreviousPath() path.Path {
|
||||
return nil
|
||||
return col.prevPath
|
||||
}
|
||||
|
||||
func (col Collection) State() data.CollectionState {
|
||||
|
||||
@ -12,6 +12,7 @@ import (
|
||||
|
||||
type mockColl struct {
|
||||
p path.Path
|
||||
prevP path.Path
|
||||
}
|
||||
|
||||
func (mc mockColl) Items() <-chan Stream {
|
||||
@ -23,7 +24,7 @@ func (mc mockColl) FullPath() path.Path {
|
||||
}
|
||||
|
||||
func (mc mockColl) PreviousPath() path.Path {
|
||||
return nil
|
||||
return mc.prevP
|
||||
}
|
||||
|
||||
func (mc mockColl) State() CollectionState {
|
||||
@ -54,7 +55,7 @@ func (suite *CollectionSuite) TestResourceOwnerSet() {
|
||||
ToDataLayerExchangePathForCategory("tid", resource, path.EventsCategory, false)
|
||||
require.NoError(t, err)
|
||||
|
||||
return mockColl{p}
|
||||
return mockColl{p, nil}
|
||||
}
|
||||
|
||||
table := []struct {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user