migrate test api images history integration cli test to integration test#50390
Merged
vvoland merged 3 commits intomoby:masterfrom Jul 14, 2025
Conversation
Signed-off-by: Abubacarr Ceesay <abubacarr671@gmail.com>
vvoland
reviewed
Jul 11, 2025
Contributor
vvoland
left a comment
There was a problem hiding this comment.
Thanks! Left some small comments, but looks good overall ❤️
integration/image/list_test.go
Outdated
| "github.com/docker/docker/api/types/image" | ||
| "github.com/docker/docker/api/types/versions" | ||
| "github.com/docker/docker/client" | ||
| buildImage "github.com/docker/docker/integration/internal/build" |
Contributor
There was a problem hiding this comment.
I think we can just use the build package as it doesn't seem to clash with other imports.
Suggested change
| buildImage "github.com/docker/docker/integration/internal/build" | |
| "github.com/docker/docker/integration/internal/build" |
Contributor
Author
There was a problem hiding this comment.
Noted.
Initially, there was a clash as I hadn't updated my branch for a while prior to making a commit. I will update it.
integration/image/list_test.go
Outdated
| imgID := buildImage.Do(ctx, t, client, fakecontext.New(t, t.TempDir(), fakecontext.WithDockerfile(dockerfile))) | ||
|
|
||
| historydata, err := client.ImageHistory(ctx, imgID) | ||
|
|
integration/image/list_test.go
Outdated
|
|
||
| func TestAPIImagesHistory(t *testing.T) { | ||
| ctx := setupTest(t) | ||
|
|
Contributor
There was a problem hiding this comment.
nit: we can remove the extra spacing
Suggested change
Signed-off-by: Abubacarr Ceesay <abubacarr671@gmail.com>
Signed-off-by: Abubacarr Ceesay <abubacarr671@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Migrated the TestAPIImagesHistory to integration tests in reference to the integration-cli migration epic #50159
- How I did it
I leveraged the integration/internal/build package to build an image and tested the imageHistory on it
- How to verify it
Run the integration test as follows
TEST_INTEGRATION_DIR=./integration/image TESTFLAGS='-test.run TestAPIImagesHistory' ./hack/make.sh dynbinary test-integration- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)