Skip to content

e2e: minor cleanups in TestPromptExitCode#6238

Merged
thaJeztah merged 2 commits intodocker:masterfrom
thaJeztah:e2e_touchups
Aug 6, 2025
Merged

e2e: minor cleanups in TestPromptExitCode#6238
thaJeztah merged 2 commits intodocker:masterfrom
thaJeztah:e2e_touchups

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Aug 5, 2025

e2e/testutils: SetupPlugin: return path of directory

The gotest.tools fs.NewDir utility already sets up a t.Cleanup,
so we can treat it the same as t.TempDir() and let it handle
cleaning up by itself.

We should probably consider replacing some of this with t.TempDir.

e2e/global: TestPromptExitCode: group plugin preparation steps

Use names for the plugin that don't refer to content-trust, as that's
not related to this test.

Make it slightly more clear which steps are preparation and which
are the actual test. The test sometimes fails in the preparation
step, and we could consider moving those separate and XFail the
test if the preparation fails;

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
e2e/testutils/plugins.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@thaJeztah
Copy link
Member Author

Derp; that doesn't work;

70.16 e2e/global/cli_test.go:82:6: TestPromptExitCode should call t.Parallel on the top level as well as its subtests (tparallel)
70.16 func TestPromptExitCode(t *testing.T) {
70.16      ^

@thaJeztah
Copy link
Member Author

I still saw some failures without the t.Parallel() - I'll move that to a separate (draft) PR

The gotest.tools `fs.NewDir` utility already sets up a `t.Cleanup`,
so we can treat it the same as `t.TempDir()` and let it handle
cleaning up by itself.

We should probably consider replacing some of this with `t.TempDir`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Use names for the plugin that don't refer to content-trust, as that's
not related to this test.

Make it slightly more clear which steps are preparation and which
are the actual test. The test sometimes fails in the preparation
step, and we could consider moving those separate and XFail the
test if the preparation fails;

        Stderr:   error pushing plugin: failed to do request: Head "https://registry:5000/v2/plugin-content-trust-upgrade/blobs/sha256:af932a31d4df3a2890f900bcf28e16cea87b2b440b8036ba86ab3418f3e50a35": http: server gave HTTP response to HTTPS client

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah changed the title e2e: minor cleanups, and disable t.Parallel() for TestPromptExitCode e2e: minor cleanups in TestPromptExitCode Aug 6, 2025
@thaJeztah thaJeztah merged commit 8683664 into docker:master Aug 6, 2025
105 of 109 checks passed
@thaJeztah thaJeztah deleted the e2e_touchups branch August 6, 2025 10:30
@thaJeztah thaJeztah added this to the 29.0.0 milestone Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants