Skip to content

integration: migrate TestAPIImagesSizeCompatibility to integration test#51564

Merged
robmry merged 1 commit intomoby:masterfrom
2003Aditya:TestAPIImagesSizeCompatibility
Dec 5, 2025
Merged

integration: migrate TestAPIImagesSizeCompatibility to integration test#51564
robmry merged 1 commit intomoby:masterfrom
2003Aditya:TestAPIImagesSizeCompatibility

Conversation

@2003Aditya
Copy link
Contributor

@2003Aditya 2003Aditya commented Nov 19, 2025

- What I did
Migrated the TestAPIImagesSizeCompatibility test from integration-cli/docker_api_image_test.go to the new integration test framework under integration/image/size_test.go.

Copy link
Contributor

@robmry robmry left a comment

Choose a reason for hiding this comment

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

Thank you @2003Aditya ...

"gotest.tools/v3/assert"
)

func TestAPIImagesSizeCompatibility(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func TestAPIImagesSizeCompatibility(t *testing.T) {
// Test case for 30027: image size reported as -1 in v1.12 client against v1.13 daemon.
func TestAPIImagesSizeCompatibility(t *testing.T) {

for _, img := range v124Images.Items {
assert.Assert(t, img.Size != int64(-1))
}

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: blank line

@2003Aditya 2003Aditya force-pushed the TestAPIImagesSizeCompatibility branch from 5c89856 to 647f078 Compare November 19, 2025 18:42
@robmry
Copy link
Contributor

robmry commented Nov 20, 2025

Thank you for the updates - looks good.

There's a gofmt error in the tests (the other failures are unrelated) ...

integration/image/size_test.go:13:1: File is not properly formatted (gofmt)
    testCases := []struct {
^

Plus the couple of nits above - blank line and the bug ref comment.

@2003Aditya 2003Aditya force-pushed the TestAPIImagesSizeCompatibility branch from 647f078 to 5289321 Compare November 20, 2025 12:21
@robmry
Copy link
Contributor

robmry commented Nov 26, 2025

Just the two nits to address on this one (bug ref comment and blank line).

And - we should rename the test to TestImagesSizeCompatibility.

@2003Aditya 2003Aditya force-pushed the TestAPIImagesSizeCompatibility branch from 5289321 to a8cfa23 Compare November 28, 2025 12:07
@robmry
Copy link
Contributor

robmry commented Nov 28, 2025

This one has a merge conflict too (and blank line at the end of the test).

@2003Aditya 2003Aditya force-pushed the TestAPIImagesSizeCompatibility branch 2 times, most recently from 87324b7 to fc39b05 Compare November 28, 2025 18:57
Signed-off-by: Aditya Mishra <mishraaditya675@gmail.com>
@2003Aditya 2003Aditya force-pushed the TestAPIImagesSizeCompatibility branch from fc39b05 to 87583c9 Compare November 28, 2025 18:59
@robmry robmry merged commit 1b99d36 into moby:master Dec 5, 2025
181 of 182 checks passed
@thaJeztah thaJeztah added this to the 29.2.0 milestone Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/images Image Distribution area/testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants