e2e: reformat error message with consistent formatting

To make the error return consistent across e2e tests we have decided
to remove with error presence from the logs and this commit
does that for e2e/cephfs_helper.go.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2021-11-22 12:26:06 +05:30 committed by mergify[bot]
parent 9bab088ddc
commit f7f5a41774

View File

@ -27,7 +27,7 @@ func validateSubvolumegroup(f *framework.Framework, subvolgrp string) error {
return fmt.Errorf("failed to exec command in toolbox: %w", err) return fmt.Errorf("failed to exec command in toolbox: %w", err)
} }
if stdErr != "" { if stdErr != "" {
return fmt.Errorf("failed to getpath for subvolumegroup %s with error %v", subvolgrp, stdErr) return fmt.Errorf("failed to getpath for subvolumegroup %s : %v", subvolgrp, stdErr)
} }
expectedGrpPath := "/volumes/" + subvolgrp expectedGrpPath := "/volumes/" + subvolgrp
stdOut = strings.TrimSpace(stdOut) stdOut = strings.TrimSpace(stdOut)
@ -193,7 +193,7 @@ func getSubvolumePath(f *framework.Framework, filesystem, subvolgrp, subvolume s
return "", err return "", err
} }
if stdErr != "" { if stdErr != "" {
return "", fmt.Errorf("failed to getpath for subvolume %s with error %s", subvolume, stdErr) return "", fmt.Errorf("failed to getpath for subvolume %s : %s", subvolume, stdErr)
} }
return strings.TrimSpace(stdOut), nil return strings.TrimSpace(stdOut), nil