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:
parent
af64b487ac
commit
d953ca6c41
@ -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())
|
||||
|
||||
@ -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())
|
||||
|
||||
@ -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())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user