integration-cli: TestInspectAPIMultipleNetworks: use current version
This test was added inf301c5765a
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> (cherry picked from commita0466ca8e1
) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
05267e9e8c
commit
cdf3611cff
1 changed files with 7 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue