Skip to content

fix: split ctr_test into foreground and detached contexts - #69

Open
mdryaaan wants to merge 3 commits into
urunc-dev:mainfrom
mdryaaan:fix/ctr-test-foreground-detached-split
Open

mdryaaan wants to merge 3 commits into
urunc-dev:mainfrom
mdryaaan:fix/ctr-test-foreground-detached-split

Conversation

@mdryaaan

@mdryaaan mdryaaan commented May 15, 2026

Copy link
Copy Markdown
Contributor

Description

tests/e2e/ctr_test.go routed all test cases through a single DescribeTable calling runForegroundTest, regardless of whether a test case had a TestFunc set. Any case with a non-nil TestFunc would have it silently ignored — runForegroundTest only checks ExpectOut.

This change mirrors the pattern in nerdctl_test.go: a Context("foreground containers") block using selectTestCases(ctrTestCases(), false) calls runForegroundTest, and a Context("detached containers") block using selectTestCases(ctrTestCases(), true) calls runDetachedTest. No test case logic changes — purely structural.

Related issues

How was this tested?

tests/e2e/ctr_test.go is the only file changed. The single DescribeTable (line 46) was replaced with two Context blocks matching nerdctl_test.go exactly. The linter passes locally (golangci-lint run -v --timeout=5m); the only reported issues are
pre-existing CRLF noise on unmodified files that Linux CI does not flag. make unittest and make pass without errors.

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

cmainas and others added 3 commits May 8, 2026 12:24
PR: urunc-dev#58
Signed-off-by: Charalampos Mainas <charalampos.mainas@gmail.com>
Reviewed-by: Panagiotis Mavrikos <pmavrikos@nubificus.co.uk>
Approved-by: Panagiotis Mavrikos <pmavrikos@nubificus.co.uk>
PR: urunc-dev#59
Signed-off-by: char ma <test@mail.com>
Reviewed-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Approved-by: Charalampos Mainas <cmainas@nubificus.co.uk>
Signed-off-by: Md Raiyan <alikhurshid842001@gmail.com>
@cmainas
cmainas force-pushed the main branch 2 times, most recently from 5bae1ca to 27f3d06 Compare September 16, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ctr_test.go routes all test cases through runForegroundTest, silently ignoring TestFunc

3 participants