mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-02 19:20:23 +00:00
e2e: fix panic when checking error
fix panic during error handling
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 09df2c6091
)
This commit is contained in:
parent
8e55583c27
commit
9424269d86
@ -214,11 +214,14 @@ func validateOmapCount(f *framework.Framework, count int, driver, pool, mode str
|
|||||||
filterLessCmds := []string{cmds.radosLsCmd, cmds.radosLsKeysCmd}
|
filterLessCmds := []string{cmds.radosLsCmd, cmds.radosLsKeysCmd}
|
||||||
for i, cmd := range filterCmds {
|
for i, cmd := range filterCmds {
|
||||||
stdOut, stdErr, err := execCommandInToolBoxPod(f, cmd, rookNamespace)
|
stdOut, stdErr, err := execCommandInToolBoxPod(f, cmd, rookNamespace)
|
||||||
if err != nil || stdErr != "" {
|
if err != nil {
|
||||||
if !strings.Contains(err.Error(), exitOneErr) {
|
if !strings.Contains(err.Error(), exitOneErr) {
|
||||||
e2elog.Failf("failed to execute rados command '%s' : err=%v stdErr=%s", cmd, err, stdErr)
|
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)
|
err = compareStdoutWithCount(stdOut, count)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user