diff --git a/integration/docker/sysctls_test.go b/integration/docker/sysctls_test.go new file mode 100644 index 000000000..7d77261bb --- /dev/null +++ b/integration/docker/sysctls_test.go @@ -0,0 +1,37 @@ +// Copyright (c) 2019 Intel Corporation +// +// SPDX-License-Identifier: Apache-2.0 + +package docker + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" +) + +var _ = Describe("sysctls", func() { + var ( + args []string + id string + stdout string + exitCode int + ) + + BeforeEach(func() { + id = randomDockerName() + }) + + AfterEach(func() { + Expect(ExistDockerContainer(id)).NotTo(BeTrue()) + }) + + Context("sysctls for fs", func() { + It("should be applied", func() { + fsValue := "512" + args = []string{"--name", id, "--rm", "--sysctl", "fs.mqueue.queues_max=" + fsValue, Image, "cat", "/proc/sys/fs/mqueue/queues_max"} + stdout, _, exitCode = dockerRun(args...) + Expect(exitCode).To(Equal(0)) + Expect(stdout).To(ContainSubstring(fsValue)) + }) + }) +})