From 5a14fdbf7f3dca7721ecb354cfcaf74f5f2a2f5e Mon Sep 17 00:00:00 2001 From: Hironori Shiina Date: Fri, 28 Mar 2025 11:18:33 +0000 Subject: [PATCH] e2e: Keep original error when exec in container fails --- test/e2e/framework/pod/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/framework/pod/utils.go b/test/e2e/framework/pod/utils.go index db7106e863e..d48fd60e1ec 100644 --- a/test/e2e/framework/pod/utils.go +++ b/test/e2e/framework/pod/utils.go @@ -304,7 +304,7 @@ func VerifyCgroupValue(f *framework.Framework, pod *v1.Pod, cName, cgPath string pod.Namespace, pod.Name, cName, expectedCgValues, cgPath) cgValue, _, err := ExecCommandInContainerWithFullOutput(f, pod.Name, cName, "/bin/sh", "-c", cmd) if err != nil { - return fmt.Errorf("failed to find one of the expected cgroup values %q in container cgroup %q", expectedCgValues, cgPath) + return fmt.Errorf("failed to find one of the expected cgroup values %q in container cgroup %q: %w", expectedCgValues, cgPath, err) } cgValue = strings.Trim(cgValue, "\n")