mirror of
https://github.com/moby/moby.git
synced 2025-07-29 07:21:35 +03:00
integration-cli: TestInspectAPIMultipleNetworks: use current version
This test was added in f301c5765a
to test
inspect output for API > v1.21, however, it was pinned to API v1.21,
which is now deprecated.
Remove the fixed version, as the intent was to test "current" API versions
(API v1.21 and up),
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -1022,15 +1022,16 @@ func (s *DockerCLINetworkSuite) TestInspectAPIMultipleNetworks(c *testing.T) {
|
||||
|
||||
versionedIP := inspect120.NetworkSettings.IPAddress
|
||||
|
||||
body = getInspectBody(c, "v1.21", id)
|
||||
var inspect121 types.ContainerJSON
|
||||
err = json.Unmarshal(body, &inspect121)
|
||||
// Current API version (API v1.21 and up)
|
||||
body = getInspectBody(c, "", id)
|
||||
var inspectCurrent types.ContainerJSON
|
||||
err = json.Unmarshal(body, &inspectCurrent)
|
||||
assert.NilError(c, err)
|
||||
assert.Equal(c, len(inspect121.NetworkSettings.Networks), 3)
|
||||
assert.Equal(c, len(inspectCurrent.NetworkSettings.Networks), 3)
|
||||
|
||||
bridge := inspect121.NetworkSettings.Networks["bridge"]
|
||||
bridge := inspectCurrent.NetworkSettings.Networks["bridge"]
|
||||
assert.Equal(c, bridge.IPAddress, versionedIP)
|
||||
assert.Equal(c, bridge.IPAddress, inspect121.NetworkSettings.IPAddress)
|
||||
assert.Equal(c, bridge.IPAddress, inspectCurrent.NetworkSettings.IPAddress)
|
||||
}
|
||||
|
||||
func connectContainerToNetworks(c *testing.T, d *daemon.Daemon, cName string, nws []string) {
|
||||
|
Reference in New Issue
Block a user