fix nightly user not found tests (#4990)

Tests got out of date due to brittle comparisons on error message strings.  No good solution for the brittleness, unfortunately.  But we can fix the failure.

---

#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 🐛 Bugfix
- [x] 🤖 Supportability/Tests

#### Test Plan

- [x] 💪 Manual
- [x] 💚 E2E
This commit is contained in:
Keepers 2024-01-08 15:10:05 -07:00 committed by GitHub
parent af64b487ac
commit d953ca6c41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -222,7 +222,8 @@ func runExchangeBackupUserNotFoundTest(suite *BackupExchangeE2ESuite, category p
assert.Contains(
t,
err.Error(),
"not found in tenant", "error missing user not found")
"resource owner not found",
"error missing user not found")
assert.NotContains(t, err.Error(), "runtime error", "panic happened")
t.Logf("backup error message: %s", err.Error())

View File

@ -182,7 +182,8 @@ func runGroupsBackupGroupNotFoundTest(suite *BackupGroupsE2ESuite, category stri
assert.Contains(
t,
err.Error(),
"not found in tenant", "error missing group not found")
"resource owner not found",
"error missing user not found")
assert.NotContains(t, err.Error(), "runtime error", "panic happened")
t.Logf("backup error message: %s", err.Error())

View File

@ -94,7 +94,7 @@ func (suite *NoBackupOneDriveE2ESuite) TestOneDriveBackupCmd_userNotInTenant() {
cmd := cliTD.StubRootCmd(
"backup", "create", "onedrive",
"--"+flags.ConfigFileFN, suite.dpnd.configFilePath,
"--"+flags.UserFN, "foo@nothere.com")
"--"+flags.UserFN, "foo@not-there.com")
cli.BuildCommandTree(cmd)
cmd.SetOut(&recorder)
@ -107,7 +107,8 @@ func (suite *NoBackupOneDriveE2ESuite) TestOneDriveBackupCmd_userNotInTenant() {
assert.Contains(
t,
err.Error(),
"not found in tenant", "error missing user not found")
"resource owner not found",
"error missing user not found")
assert.NotContains(t, err.Error(), "runtime error", "panic happened")
t.Logf("backup error message: %s", err.Error())