Description
tests/e2e/ctr_test.go (line 46–53) uses toTableEntries(ctrTestCases()) directly inside a single DescribeTable, routing every test case through runForegroundTest. runForegroundTest checks ExpectOut — it never calls TestFunc. Any test case in ctrTestCases() that sets a non-nil TestFunc (such as pingTest or userGroupTest) will have that function silently ignored.
In contrast, tests/e2e/nerdctl_test.go (line 46–66) correctly splits cases into foreground and detached groups using selectTestCases(nerdctlTestCases(), false) and selectTestCases(nerdctlTestCases(), true).
Currently all ctrTestCases() entries use matchTest (which is nil by Go zero-value semantics), so the bug is latent. But as ctr test cases expand to include ping or user/group tests, they will silently pass without actually running the intended test function.
Expected behavior: ctr_test.go should mirror nerdctl_test.go: cases with a nil TestFunc run as foreground tests, and cases with a non-nil TestFunc run as detached tests.
Current behavior: All ctr test cases are unconditionally sent to runForegroundTest.
Proposed fix: Wrap the existing DescribeTable in a Context("foreground containers") block using selectTestCases(ctrTestCases(), false), and add a second Context("detached containers") block using selectTestCases(ctrTestCases(), true) that calls runDetachedTest.
Description
tests/e2e/ctr_test.go(line 46–53) usestoTableEntries(ctrTestCases())directly inside a singleDescribeTable, routing every test case throughrunForegroundTest.runForegroundTestchecksExpectOut— it never callsTestFunc. Any test case inctrTestCases()that sets a non-nilTestFunc(such aspingTestoruserGroupTest) will have that function silently ignored.In contrast,
tests/e2e/nerdctl_test.go(line 46–66) correctly splits cases into foreground and detached groups usingselectTestCases(nerdctlTestCases(), false)andselectTestCases(nerdctlTestCases(), true).Currently all
ctrTestCases()entries usematchTest(which is nil by Go zero-value semantics), so the bug is latent. But as ctr test cases expand to include ping or user/group tests, they will silently pass without actually running the intended test function.Expected behavior:
ctr_test.goshould mirrornerdctl_test.go: cases with a nilTestFuncrun as foreground tests, and cases with a non-nilTestFuncrun as detached tests.Current behavior: All ctr test cases are unconditionally sent to
runForegroundTest.Proposed fix: Wrap the existing
DescribeTablein aContext("foreground containers")block usingselectTestCases(ctrTestCases(), false), and add a secondContext("detached containers")block usingselectTestCases(ctrTestCases(), true)that callsrunDetachedTest.