From 9cf6b7f8dcfb1c6984ebf9cc49635ff97f29c4d7 Mon Sep 17 00:00:00 2001 From: Steven Taylor Date: Thu, 4 Feb 2021 19:57:08 +0000 Subject: [PATCH] play kube selinux test case added skip to test case where selinux not enabled Signed-off-by: Steven Taylor --- test/e2e/play_kube_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index e34063dc2a..2e5c72b0e8 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -13,6 +13,7 @@ import ( . "github.com/containers/podman/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "github.com/opencontainers/selinux/go-selinux" ) var unknownKindYaml = ` @@ -847,6 +848,9 @@ var _ = Describe("Podman play kube", func() { }) It("podman play kube fail with custom selinux label", func() { + if !selinux.GetEnabled() { + Skip("SELinux not enabled") + } err := writeYaml(selinuxLabelPodYaml, kubeYaml) Expect(err).To(BeNil())