From 9fd3b81f6edd333ff35f5ea458a97c5fbaaf2f69 Mon Sep 17 00:00:00 2001 From: ashmrtn Date: Thu, 16 Mar 2023 22:31:26 -0700 Subject: [PATCH] More rigorous email test with repeat folder names (#2792) Expand coverage for email tests by creating a layout that has duplicate folder names at different levels of the hierarchy. --- #### Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No #### Type of change - [ ] :sunflower: Feature - [ ] :bug: Bugfix - [ ] :world_map: Documentation - [x] :robot: Test - [ ] :computer: CI/Deployment - [x] :broom: Tech Debt/Cleanup #### Issue(s) * closes #1228 #### Test Plan - [ ] :muscle: Manual - [x] :zap: Unit test - [ ] :green_heart: E2E --- .../connector/graph_connector_test.go | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/internal/connector/graph_connector_test.go b/src/internal/connector/graph_connector_test.go index c19221f64..3702abb0a 100644 --- a/src/internal/connector/graph_connector_test.go +++ b/src/internal/connector/graph_connector_test.go @@ -652,6 +652,36 @@ func (suite *GraphConnectorIntegrationSuite) TestRestoreAndBackup() { }, }, }, + { + pathElements: []string{"Work", "Inbox"}, + category: path.EmailCategory, + items: []itemInfo{ + { + name: "someencodeditemID4", + data: mockconnector.GetMockMessageWithBodyBytes( + subjectText+"-4", + bodyText+" 4.", + bodyText+" 4.", + ), + lookupKey: subjectText + "-4", + }, + }, + }, + { + pathElements: []string{"Work", "Inbox", "Work"}, + category: path.EmailCategory, + items: []itemInfo{ + { + name: "someencodeditemID5", + data: mockconnector.GetMockMessageWithBodyBytes( + subjectText+"-5", + bodyText+" 5.", + bodyText+" 5.", + ), + lookupKey: subjectText + "-5", + }, + }, + }, }, }, {