mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
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:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user