|
@@ -22,6 +22,7 @@ import (
|
|
|
networktypes "github.com/docker/docker/api/types/network"
|
|
|
"github.com/docker/docker/api/types/versions"
|
|
|
"github.com/docker/docker/client"
|
|
|
+ dconfig "github.com/docker/docker/daemon/config"
|
|
|
"github.com/docker/docker/integration-cli/cli"
|
|
|
"github.com/docker/docker/integration-cli/cli/build"
|
|
|
"github.com/docker/docker/pkg/ioutils"
|
|
@@ -1441,7 +1442,7 @@ func (s *DockerSuite) TestPostContainersCreateShmSizeNegative(c *testing.T) {
|
|
|
func (s *DockerSuite) TestPostContainersCreateShmSizeHostConfigOmitted(c *testing.T) {
|
|
|
// ShmSize is not supported on Windows
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
- var defaultSHMSize int64 = 67108864
|
|
|
+
|
|
|
config := containertypes.Config{
|
|
|
Image: "busybox",
|
|
|
Cmd: []string{"mount"},
|
|
@@ -1457,7 +1458,7 @@ func (s *DockerSuite) TestPostContainersCreateShmSizeHostConfigOmitted(c *testin
|
|
|
containerJSON, err := cli.ContainerInspect(context.Background(), container.ID)
|
|
|
assert.NilError(c, err)
|
|
|
|
|
|
- assert.Equal(c, containerJSON.HostConfig.ShmSize, defaultSHMSize)
|
|
|
+ assert.Equal(c, containerJSON.HostConfig.ShmSize, dconfig.DefaultShmSize)
|
|
|
|
|
|
out, _ := dockerCmd(c, "start", "-i", containerJSON.ID)
|
|
|
shmRegexp := regexp.MustCompile(`shm on /dev/shm type tmpfs(.*)size=65536k`)
|