Skip to content

fix: split ctr_test into foreground and detached contexts#69

Open
mdryaan wants to merge 1 commit into
urunc-dev:mainfrom
mdryaan:fix/ctr-test-foreground-detached-split
Open

fix: split ctr_test into foreground and detached contexts#69
mdryaan wants to merge 1 commit into
urunc-dev:mainfrom
mdryaan:fix/ctr-test-foreground-detached-split

Conversation

@mdryaan
Copy link
Copy Markdown

@mdryaan mdryaan commented May 15, 2026

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.

Signed-off-by: Md Raiyan <alikhurshid842001@gmail.com>
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

1 participant