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
|
// TODO(ashmrtn): Fill in with previous path once GraphConnector compares old
|
||||||
// and new folder hierarchies.
|
// and new folder hierarchies.
|
||||||
func (col Collection) PreviousPath() path.Path {
|
func (col Collection) PreviousPath() path.Path {
|
||||||
return nil
|
return col.prevPath
|
||||||
}
|
}
|
||||||
|
|
||||||
func (col Collection) State() data.CollectionState {
|
func (col Collection) State() data.CollectionState {
|
||||||
|
|||||||
@ -11,7 +11,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type mockColl struct {
|
type mockColl struct {
|
||||||
p path.Path
|
p path.Path
|
||||||
|
prevP path.Path
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mc mockColl) Items() <-chan Stream {
|
func (mc mockColl) Items() <-chan Stream {
|
||||||
@ -23,7 +24,7 @@ func (mc mockColl) FullPath() path.Path {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (mc mockColl) PreviousPath() path.Path {
|
func (mc mockColl) PreviousPath() path.Path {
|
||||||
return nil
|
return mc.prevP
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mc mockColl) State() CollectionState {
|
func (mc mockColl) State() CollectionState {
|
||||||
@ -54,7 +55,7 @@ func (suite *CollectionSuite) TestResourceOwnerSet() {
|
|||||||
ToDataLayerExchangePathForCategory("tid", resource, path.EventsCategory, false)
|
ToDataLayerExchangePathForCategory("tid", resource, path.EventsCategory, false)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
return mockColl{p}
|
return mockColl{p, nil}
|
||||||
}
|
}
|
||||||
|
|
||||||
table := []struct {
|
table := []struct {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user