From 2072414619b657d33f150a662c005cb2117a1128 Mon Sep 17 00:00:00 2001 From: Markus Rudy Date: Wed, 13 Mar 2024 14:44:44 +0100 Subject: [PATCH] e2e: return stdout/stderr even on exec failure The exec call returns an error if the remote command had a non-zero return code, which is when access to the output is most important. --- e2e/internal/kubeclient/kubeclient.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/e2e/internal/kubeclient/kubeclient.go b/e2e/internal/kubeclient/kubeclient.go index 8eeedd5cd..1f7397dd4 100644 --- a/e2e/internal/kubeclient/kubeclient.go +++ b/e2e/internal/kubeclient/kubeclient.go @@ -112,9 +112,6 @@ func (c *Kubeclient) Exec(ctx context.Context, namespace, pod string, argv []str Stderr: errBuf, Tty: false, }) - if err != nil { - return "", "", fmt.Errorf("executing command: %w", err) - } - return buf.String(), errBuf.String(), nil + return buf.String(), errBuf.String(), err }