e2e: return useful error message when ConfigMap creation fails

In case the toolbox pod is not available, the error message lists that
no Pods are found, but there is no hint about the toolbox. By mentioning
the toolbox in the error message, it suggests a good place to start
troubleshooting the environment.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2022-04-07 17:26:38 +02:00 committed by mergify[bot]
parent 6043a30877
commit ab5ca13586

View File

@ -47,7 +47,7 @@ func createConfigMap(pluginPath string, c kubernetes.Interface, f *framework.Fra
fsID, stdErr, err := execCommandInToolBoxPod(f, "ceph fsid", rookNamespace) fsID, stdErr, err := execCommandInToolBoxPod(f, "ceph fsid", rookNamespace)
if err != nil { if err != nil {
return err return fmt.Errorf("failed to exec command in toolbox: %w", err)
} }
if stdErr != "" { if stdErr != "" {
return fmt.Errorf("error getting fsid %v", stdErr) return fmt.Errorf("error getting fsid %v", stdErr)