use StatsResponse instead of Stats in tests

The StatsResponse type  was a compatibility-wrapper introduced in
d3379946ec 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 <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-01-15 17:44:05 +01:00
parent b1c00b18bd
commit 16cbb27e4e
4 changed files with 6 additions and 6 deletions

View File

@@ -177,7 +177,7 @@ func (s *DockerAPISuite) TestGetContainerStats(c *testing.T) {
case sr := <-bc:
dec := json.NewDecoder(sr.stats.Body)
defer sr.stats.Body.Close()
var s *container.Stats
var s *container.StatsResponse
// decode only one object from the stream
assert.NilError(c, dec.Decode(&s))
}