Skip to content

Commit

Permalink
test: Add docker integration test for sysctls
Browse files Browse the repository at this point in the history
This will add a docker integration test for sysctls.

Fixes kata-containers#1312

Signed-off-by: Gabriela Cervantes <[email protected]>
  • Loading branch information
GabyCT committed Mar 20, 2019
1 parent 77425fb commit 9831668
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions integration/docker/sysctls_test.go
Original file line number Diff line number Diff line change
@@ -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))
})
})
})

0 comments on commit 9831668

Please sign in to comment.