diff options
author | Yiqiao Pu <ypu@redhat.com> | 2018-05-31 21:47:27 +0800 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-06-04 18:14:33 +0000 |
commit | 37751ea5b5e71e84119e256136b8bf90aa9ae22f (patch) | |
tree | 29acffdf0f3f5f0ad807d13274f0ba36169a4dc8 /test/e2e | |
parent | 6d52ebdd13ad052bbf8bfa9efa4e45cafbce1fc2 (diff) | |
download | podman-37751ea5b5e71e84119e256136b8bf90aa9ae22f.tar.gz podman-37751ea5b5e71e84119e256136b8bf90aa9ae22f.tar.bz2 podman-37751ea5b5e71e84119e256136b8bf90aa9ae22f.zip |
Use go-selinux for selinux check
Use function in opencontainers/selinux/go-selinux to check the
selinux status in our test.
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Closes: #837
Approved by: rhatdan
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/run_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 5f2bccdac..a581b36fb 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -10,6 +10,7 @@ import ( "github.com/mrunalp/fileutils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "github.com/opencontainers/selinux/go-selinux" ) var _ = Describe("Podman run", func() { @@ -51,8 +52,7 @@ var _ = Describe("Podman run", func() { }) It("podman run selinux grep test", func() { - selinux := podmanTest.SystemExec("ls", []string{"/usr/sbin/selinuxenabled"}) - if selinux.ExitCode() != 0 { + if !selinux.GetEnabled() { Skip("SELinux not enabled") } session := podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=level:s0:c1,c2", ALPINE, "cat", "/proc/self/attr/current"}) |