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>
  • Loading branch information
Madhu-1 authored and mergify[bot] committed Oct 26, 2022
1 parent 607c654 commit 09df2c6
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 @@ -215,11 +215,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 09df2c6

Please sign in to comment.