Merge pull request #47169 from thaJeztah/25.0_backport_test_fixes
[25.0 backport] backport test-fixes
This commit is contained in:
commit
39fedb254b
4 changed files with 16 additions and 10 deletions
|
@ -8,12 +8,12 @@ ARG XX_VERSION=1.2.1
|
|||
ARG VPNKIT_VERSION=0.5.0
|
||||
|
||||
ARG DOCKERCLI_REPOSITORY="https://github.com/docker/cli.git"
|
||||
ARG DOCKERCLI_VERSION=v24.0.2
|
||||
ARG DOCKERCLI_VERSION=v25.0.0
|
||||
# cli version used for integration-cli tests
|
||||
ARG DOCKERCLI_INTEGRATION_REPOSITORY="https://github.com/docker/cli.git"
|
||||
ARG DOCKERCLI_INTEGRATION_VERSION=v17.06.2-ce
|
||||
ARG BUILDX_VERSION=0.12.1
|
||||
ARG COMPOSE_VERSION=v2.24.0
|
||||
ARG COMPOSE_VERSION=v2.24.1
|
||||
|
||||
ARG SYSTEMD="false"
|
||||
ARG DOCKER_STATIC=1
|
||||
|
|
|
@ -1287,7 +1287,7 @@ func (s *DockerAPISuite) TestPutContainerArchiveErrSymlinkInVolumeToReadOnlyRoot
|
|||
// Attempt to extract to a symlink in the volume which points to a
|
||||
// directory outside the volume. This should cause an error because the
|
||||
// rootfs is read-only.
|
||||
apiClient, err := client.NewClientWithOpts(client.FromEnv, client.WithVersion("v1.20"))
|
||||
apiClient, err := client.NewClientWithOpts(client.FromEnv)
|
||||
assert.NilError(c, err)
|
||||
|
||||
err = apiClient.CopyToContainer(testutil.GetContext(c), cID, "/vol2/symlinkToAbsDir", nil, types.CopyToContainerOptions{})
|
||||
|
|
|
@ -159,6 +159,11 @@ func (s *DockerAPISuite) TestInspectAPIBridgeNetworkSettings120(c *testing.T) {
|
|||
assert.Assert(c, len(settings.IPAddress) != 0)
|
||||
}
|
||||
|
||||
// Inspect for API v1.21 and up; see
|
||||
//
|
||||
// - https://github.com/moby/moby/issues/17131
|
||||
// - https://github.com/moby/moby/issues/17139
|
||||
// - https://github.com/moby/moby/issues/17173
|
||||
func (s *DockerAPISuite) TestInspectAPIBridgeNetworkSettings121(c *testing.T) {
|
||||
// Windows doesn't have any bridge network settings
|
||||
testRequires(c, DaemonIsLinux)
|
||||
|
@ -166,7 +171,7 @@ func (s *DockerAPISuite) TestInspectAPIBridgeNetworkSettings121(c *testing.T) {
|
|||
containerID := strings.TrimSpace(out)
|
||||
cli.WaitRun(c, containerID)
|
||||
|
||||
body := getInspectBody(c, "v1.21", containerID)
|
||||
body := getInspectBody(c, "", containerID)
|
||||
|
||||
var inspectJSON types.ContainerJSON
|
||||
err := json.Unmarshal(body, &inspectJSON)
|
||||
|
|
|
@ -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