use prevPath in data.Collection (#1943)

## Type of change

- [x] 🐛 Bugfix

## Issue(s)

* #1777

## Test Plan

- [x] 💪 Manual
This commit is contained in:
Keepers 2022-12-23 14:48:37 -07:00 committed by GitHub
parent a1444f529e
commit 73c4937456
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -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 {

View File

@ -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 {