Skip to content

use StatsResponse instead of Stats in tests#49284

Merged
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:test_statsresponse
Jan 16, 2025
Merged

use StatsResponse instead of Stats in tests#49284
thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah:test_statsresponse

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

The StatsResponse type was a compatibility-wrapper introduced in d337994 to differentiate responses for API < 1.21 and API >= 1.21. API versions lower than 1.24 are deprecated, and we should merge StatsResponse and Stats, but let's start with using the StatsResponse in our tests.

- Description for the changelog

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

The StatsResponse type  was a compatibility-wrapper introduced in
d337994 to differentiate responses
for  API < 1.21 and API >= 1.21. API versions lower than 1.24 are
deprecated, and we should merge StatsResponse and Stats, but let's
start with using the StatsResponse in our tests.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added status/2-code-review area/testing kind/refactor PR's that refactor, or clean-up code labels Jan 15, 2025
@thaJeztah thaJeztah added this to the 28.0.0 milestone Jan 15, 2025
@thaJeztah thaJeztah self-assigned this Jan 15, 2025
Copy link
Copy Markdown
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.

LGTM.

(In case it helps anyone else who's looking at this, StatsResponse was called StatsJSON when it was first added.)

@thaJeztah
Copy link
Copy Markdown
Member Author

oh! yes, sorry, forgot to put that in the description 🙈 it was moved and renamed, but the situation was the same still.

@thaJeztah
Copy link
Copy Markdown
Member Author

I'll bring this one in; I'll be working on some of the follow-ups, but wanted to do this first to "prove" that only the outer wrapper is actually needed, and we don't need the wrapped (Stats) type separately for things to function.

@thaJeztah thaJeztah merged commit 1153242 into moby:master Jan 16, 2025
@thaJeztah thaJeztah deleted the test_statsresponse branch January 16, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants