From 03048a6ca84de3faee01d8a9b90c739bc9f5208e Mon Sep 17 00:00:00 2001 From: ashmrtn <3891298+ashmrtn@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:32:25 -0800 Subject: [PATCH] Fix contains check for exchange nightly tests (#5214) Data being checked drifted due to recent changes in the test helper and possible CLI output changes --- #### 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 - [x] :bug: Bugfix - [ ] :world_map: Documentation - [x] :robot: Supportability/Tests - [ ] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup #### Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- src/cli/backup/exchange_e2e_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cli/backup/exchange_e2e_test.go b/src/cli/backup/exchange_e2e_test.go index 93d6f01d4..4b6f51ac7 100644 --- a/src/cli/backup/exchange_e2e_test.go +++ b/src/cli/backup/exchange_e2e_test.go @@ -150,8 +150,8 @@ func runExchangeBackupCategoryTest(suite *BackupExchangeE2ESuite, category path. result := recorder.String() t.Log("backup results", result) - // as an offhand check: the result should contain the m365 user id - assert.Contains(t, result, suite.m365.User.ID) + // As an offhand check: the result should contain the m365 user's email. + assert.Contains(t, result, suite.m365.User.Provider.Name()) } func (suite *BackupExchangeE2ESuite) TestExchangeBackupCmd_ServiceNotEnabled_email() { @@ -183,8 +183,8 @@ func runExchangeBackupServiceNotEnabledTest(suite *BackupExchangeE2ESuite, categ result := recorder.String() t.Log("backup results", result) - // as an offhand check: the result should contain the m365 user id - assert.Contains(t, result, suite.m365.User.ID) + // As an offhand check: the result should contain the m365 user's email. + assert.Contains(t, result, suite.m365.User.Provider.Name()) } func (suite *BackupExchangeE2ESuite) TestExchangeBackupCmd_userNotFound_email() { @@ -282,8 +282,8 @@ func (suite *BackupExchangeE2ESuite) TestBackupCreateExchange_fromConfigFile() { result := suite.dpnd.recorder.String() t.Log("backup results", result) - // as an offhand check: the result should contain the m365 user id - assert.Contains(t, result, suite.m365.User.ID) + // As an offhand check: the result should contain the m365 user's email. + assert.Contains(t, result, suite.m365.User.Provider.Name()) } // AWS flags