Skip to content

Commit

Permalink
e2e: fix panic when checking error
Browse files Browse the repository at this point in the history
fix panic during error handling

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 09df2c6)
  • Loading branch information
Madhu-1 authored and mergify[bot] committed Oct 28, 2022
1 parent 8e55583 commit 9424269
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion e2e/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,14 @@ func validateOmapCount(f *framework.Framework, count int, driver, pool, mode str
filterLessCmds := []string{cmds.radosLsCmd, cmds.radosLsKeysCmd}
for i, cmd := range filterCmds {
stdOut, stdErr, err := execCommandInToolBoxPod(f, cmd, rookNamespace)
if err != nil || stdErr != "" {
if err != nil {
if !strings.Contains(err.Error(), exitOneErr) {
e2elog.Failf("failed to execute rados command '%s' : err=%v stdErr=%s", cmd, err, stdErr)
}
}
if stdErr != "" {
e2elog.Failf("failed to execute rados command '%s' : stdErr=%s", cmd, stdErr)
}
err = compareStdoutWithCount(stdOut, count)
if err == nil {
continue
Expand Down

0 comments on commit 9424269

Please sign in to comment.