Repository navigation
Conversation
|
|
||
| _, err := apiClient.ImageTag(ctx, client.ImageTagOptions{Source: "busybox:latest", Target: "busybox:testtag"}) | ||
| assert.NilError(t, err) | ||
| defer func() { |
There was a problem hiding this comment.
- Perhaps
t.Cleanup(instead ofdefer - Wondering if we should use a unique tag instead of
testtag, just in case the same tag is used in another test (possibly could uset.Name()as name for the tag)
|
Thanks for updating; before I restart CI; could you squash the commits? |
0567859 to
a99186b
Compare
|
The inline suggestions (t.Cleanup and t.Name()-based unique tag) are already in the current version — both were incorporated before vvoland's approval. The shfmt failure appears to be pre-existing and not introduced by this PR (no shell files changed). Ready for another look when you have a moment. |
| "github.com/moby/moby/v2/integration-cli/cli" | ||
| "github.com/moby/moby/v2/internal/testutil" | ||
| "gotest.tools/v3/assert" | ||
| is "gotest.tools/v3/assert/cmp" |
There was a problem hiding this comment.
Looks like this import is no longer used, which causes CI to fail;
=== Errors
Error: integration-cli\docker_api_inspect_test.go:11:2: "gotest.tools/v3/assert/cmp" imported as is and not used
a99186b to
a1aa0ae
Compare
|
Hi @thaJeztah — the commits are now squashed to a single one. Ready for CI restart when you get a chance. |
a1aa0ae to
9f5b814
Compare
|
Rebased on current master to retrigger CI. Both review comments are addressed in the current revision: the test now uses The previous run's failures looked unrelated to this change: @thaJeztah PTAL when you get a chance. |
| t.Cleanup(func() { | ||
| _, _ = apiClient.ImageRemove(ctx, tag, client.ImageRemoveOptions{Force: true}) | ||
| }) |
There was a problem hiding this comment.
Actually just realised that this cleanup is not needed at all; setupTest should already take care of that;
moby/integration/image/main_test.go
Lines 44 to 49 in 9d7874a
let me do a quick rebase and remove this
9f5b814 to
9f3eb30
Compare
| // TestImageInspectRepoTags verifies that ImageInspect returns the correct | ||
| // RepoTags after an image has been tagged. Migrated from integration-cli | ||
| // TestInspectAPIImageResponse. |
There was a problem hiding this comment.
Let's remove this bit; I'll fix before merging (waiting for CI to finish)
| // TestImageInspectRepoTags verifies that ImageInspect returns the correct | |
| // RepoTags after an image has been tagged. Migrated from integration-cli | |
| // TestInspectAPIImageResponse. | |
| // TestImageInspectRepoTags verifies that ImageInspect returns the correct | |
| // RepoTags after an image has been tagged. |
Signed-off-by: Andrew Liu <[email protected]> Signed-off-by: Sebastiaan van Stijn <[email protected]>
9f3eb30 to
1567f9e
Compare
Migrates
TestInspectAPIImageResponsefromintegration-clito the newintegration test suite, as part of the ongoing effort to replace CLI-based tests
with API-based tests (#50159).
Summary
Move
TestInspectAPIImageResponsefromintegration-cli/docker_api_inspect_test.goto
integration/image/inspect_test.goasTestImageInspectRepoTags. The new test:testEnv.APIClient()and the typed Go client instead of CLI wrapperst.Cleanupinstead ofdeferfor cleanup registrationThe original test function and its unused imports are removed from
integration-cli.Release notes (optional)
A picture of a cute animal (not mandatory but encouraged)
Created with: Claude Code