Changed code to improve output messages on error for files under test/e2e/apps (#109944)

* Improving the output of tests in case of error

* Better error message

Also, the condition in the second case was reversed

* Fixing 2 tests whose condition was inverted

* Again I got the conditions wrong

* Sorry for the confusion

* Improved error messages on failures
This commit is contained in:
Rafa de Castro
2023-01-11 11:11:44 +01:00
committed by GitHub
parent cfa6ad50e6
commit a887a3b4fd
7 changed files with 98 additions and 32 deletions

View File

@@ -496,7 +496,9 @@ var _ = SIGDescribe("Daemon set [Serial]", func() {
rollbackPods[pod.Name] = true
}
for _, pod := range existingPods {
framework.ExpectEqual(rollbackPods[pod.Name], true, fmt.Sprintf("unexpected pod %s be restarted", pod.Name))
if !rollbackPods[pod.Name] {
framework.Failf("unexpected pod %s be restarted", pod.Name)
}
}
})