Skip to content

Commit 932cff5

Browse files
committed
add more error details to the failing cgroup check
1 parent c59203e commit 932cff5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/e2e/framework/pod/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,12 @@ func VerifyCgroupValue(f *framework.Framework, pod *v1.Pod, cName, cgPath string
301301
pod.Namespace, pod.Name, cName, expectedCgValues, cgPath)
302302
cgValue, _, err := ExecCommandInContainerWithFullOutput(f, pod.Name, cName, "/bin/sh", "-c", cmd)
303303
if err != nil {
304-
return fmt.Errorf("failed to find one of the expected cgroup values %q in container cgroup %q: %w", expectedCgValues, cgPath, err)
304+
return fmt.Errorf("failed to read cgroup value %q for container %q: %w", cgPath, cName, err)
305305
}
306306
cgValue = strings.Trim(cgValue, "\n")
307307

308308
if err := framework.Gomega().Expect(cgValue).To(gomega.BeElementOf(expectedCgValues)); err != nil {
309-
return fmt.Errorf("value of cgroup %q for container %q should match one of the expectations: %w", cgPath, cName, err)
309+
return fmt.Errorf("value of cgroup %q for container %q was %q; expected one of %q", cgPath, cName, cgValue, expectedCgValues)
310310
}
311311

312312
return nil

0 commit comments

Comments
 (0)