summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-14 13:08:17 +0100
committerGitHub <noreply@github.com>2022-01-14 13:08:17 +0100
commit482e0b11d988983a777990a931a6d4125117c0f3 (patch)
treeab748201dbe30e891bb0ef2f8f63c8b64a587056 /test/e2e
parent2c510146aa03c74fb00a15bcf81c62b14df9c7ea (diff)
parent6996830104afca5926daecc05d9154a0a9eb274d (diff)
downloadpodman-482e0b11d988983a777990a931a6d4125117c0f3.tar.gz
podman-482e0b11d988983a777990a931a6d4125117c0f3.tar.bz2
podman-482e0b11d988983a777990a931a6d4125117c0f3.zip
Merge pull request #12849 from cdoern/podProhibit
Prohibit --uid/gid map and --pod for container create/run
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/create_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index 9126303cd..a482c0068 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -693,4 +693,17 @@ var _ = Describe("Podman create", func() {
Expect(idata[0].Os).To(Equal(runtime.GOOS))
Expect(idata[0].Architecture).To(Equal("arm64"))
})
+
+ It("podman create --uid/gidmap --pod conflict test", func() {
+ create := podmanTest.Podman([]string{"create", "--uidmap", "0:1000:1000", "--pod", "new:testing123", ALPINE})
+ create.WaitWithDefaultTimeout()
+ Expect(create).ShouldNot(Exit(0))
+ Expect(create.ErrorToString()).To(ContainSubstring("cannot specify a new uid/gid map when entering a pod with an infra container"))
+
+ create = podmanTest.Podman([]string{"create", "--gidmap", "0:1000:1000", "--pod", "new:testing1234", ALPINE})
+ create.WaitWithDefaultTimeout()
+ Expect(create).ShouldNot(Exit(0))
+ Expect(create.ErrorToString()).To(ContainSubstring("cannot specify a new uid/gid map when entering a pod with an infra container"))
+
+ })
})