Skip to content

refactor: migrate compose cosign verify test to nerdtest - #5120

Open
ogulcanaydogan wants to merge 1 commit into
containerd:mainfrom
ogulcanaydogan:refactor/migrate-compose-cosign-nerdtest
Open

refactor: migrate compose cosign verify test to nerdtest#5120
ogulcanaydogan wants to merge 1 commit into
containerd:mainfrom
ogulcanaydogan:refactor/migrate-compose-cosign-nerdtest

Conversation

@ogulcanaydogan

@ogulcanaydogan ogulcanaydogan commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Migrates TestComposePushAndPullWithCosignVerify from testutil.NewBase to nerdtest.Setup, the last remaining file in the nerdtest migration (#4613).

  • Uses nerdtest.RegistryWithNoAuth and nerdtest.GenerateCosignKeyPair.
  • Replaces the unbuffer helper with WithPseudoTTY() for the tty runs.
  • The build and push run once in the shared setup; each verify scenario (pull/run/up for svc0 key-match, svc1 key-mismatch, svc2 no-verify) is a subtest.

Tested on Ubuntu with containerd, buildkit and cosign. All 9 subtests pass, including the key-mismatch cases that must fail.

@ogulcanaydogan
ogulcanaydogan force-pushed the refactor/migrate-compose-cosign-nerdtest branch 2 times, most recently from 8e96072 to 00f6414 Compare August 3, 2026 13:14
@AkihiroSuda

Copy link
Copy Markdown
Member

https://github.com/containerd/nerdctl/actions/runs/30817082009/job/91698615916?pr=5120

=== Failing tests ===
TestComposePushAndPullWithCosignVerify

@AkihiroSuda AkihiroSuda added this to the v2.4.0 milestone Aug 4, 2026
@AkihiroSuda AkihiroSuda added area/ci e.g., CI failure kind/refactor labels Aug 4, 2026
@ogulcanaydogan
ogulcanaydogan force-pushed the refactor/migrate-compose-cosign-nerdtest branch from 00f6414 to c5e7c34 Compare August 4, 2026 09:17
@ogulcanaydogan
ogulcanaydogan force-pushed the refactor/migrate-compose-cosign-nerdtest branch from c5e7c34 to 4d9ff3c Compare August 4, 2026 10:12
helpers.Ensure("compose", "-f", composePath, "push")
}

testCase.Cleanup = func(data test.Data, helpers test.Helpers) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks! I will switch the subtest cleanup to composeRunCleanup() once #5116 lands. It handles the compose run one-off containers and the lock ordering more cleanly than my inline down. Will update this PR when #5116 is in.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, #5116 landed so I rebased and switched both the subtest and top-level cleanups to composeRunCleanup(). Thanks!

Migrate TestComposePushAndPullWithCosignVerify from testutil.NewBase to
nerdtest.Setup, the last remaining file in the nerdtest migration (containerd#4613).
Uses nerdtest.RegistryWithNoAuth and nerdtest.GenerateCosignKeyPair, and
WithPseudoTTY in place of the unbuffer helper for the tty runs.

Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@gmail.com>
@ogulcanaydogan
ogulcanaydogan force-pushed the refactor/migrate-compose-cosign-nerdtest branch from 4d9ff3c to 261b102 Compare August 5, 2026 12:21
@ogulcanaydogan

Copy link
Copy Markdown
Contributor Author

Thanks for catching that. The TestComposePushAndPullWithCosignVerify failure is fixed in the latest push and CI is green now. Ready for another look when you have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci e.g., CI failure kind/refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants