diff --git a/src/internal/connector/exchange/exchange_data_collection.go b/src/internal/connector/exchange/exchange_data_collection.go index fc7cfef9b..79fe67410 100644 --- a/src/internal/connector/exchange/exchange_data_collection.go +++ b/src/internal/connector/exchange/exchange_data_collection.go @@ -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 { diff --git a/src/internal/data/data_collection_test.go b/src/internal/data/data_collection_test.go index 091762daf..82e34a79c 100644 --- a/src/internal/data/data_collection_test.go +++ b/src/internal/data/data_collection_test.go @@ -11,7 +11,8 @@ import ( ) type mockColl struct { - p path.Path + 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 {