summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-30 13:31:53 -0400
committerGitHub <noreply@github.com>2021-09-30 13:31:53 -0400
commit3d08c4088fd397006241ff9c7177117a0b2269d6 (patch)
treea17dbebde0fef63ecdb97e28c2c2b825135fd83c /test
parent2a3c70fd9ce72bf619e7ad0bc28e2f0653657649 (diff)
parent1ff6a5082a440fe4a4c3f3670534ab6185d26752 (diff)
downloadpodman-3d08c4088fd397006241ff9c7177117a0b2269d6.tar.gz
podman-3d08c4088fd397006241ff9c7177117a0b2269d6.tar.bz2
podman-3d08c4088fd397006241ff9c7177117a0b2269d6.zip
Merge pull request #11793 from baude/playgenkubeselinux
Support selinux options with bind mounts play/gen
Diffstat (limited to 'test')
-rw-r--r--test/e2e/generate_kube_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go
index cb556991c..cb987e139 100644
--- a/test/e2e/generate_kube_test.go
+++ b/test/e2e/generate_kube_test.go
@@ -6,6 +6,8 @@ import (
"path/filepath"
"strconv"
+ "github.com/containers/podman/v3/libpod/define"
+
"github.com/containers/podman/v3/pkg/util"
. "github.com/containers/podman/v3/test/utils"
"github.com/ghodss/yaml"
@@ -555,6 +557,15 @@ var _ = Describe("Podman generate kube", func() {
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
+ b, err := ioutil.ReadFile(outputFile)
+ Expect(err).ShouldNot(HaveOccurred())
+ pod := new(v1.Pod)
+ err = yaml.Unmarshal(b, pod)
+ Expect(err).To(BeNil())
+ val, found := pod.Annotations[define.BindMountPrefix+vol1]
+ Expect(found).To(BeTrue())
+ Expect(val).To(HaveSuffix("z"))
+
rm := podmanTest.Podman([]string{"pod", "rm", "-f", "test1"})
rm.WaitWithDefaultTimeout()
Expect(rm).Should(Exit(0))