diff options
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/build_test.go | 15 | ||||
-rw-r--r-- | test/e2e/create_test.go | 13 | ||||
-rw-r--r-- | test/e2e/run_device_test.go | 2 |
3 files changed, 29 insertions, 1 deletions
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go index d4f0a2b04..c05dc6f3f 100644 --- a/test/e2e/build_test.go +++ b/test/e2e/build_test.go @@ -691,4 +691,19 @@ RUN ls /dev/test1`, ALPINE) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) }) + + It("podman build use absolute path even if given relative", func() { + containerFile := fmt.Sprintf(`FROM %s`, ALPINE) + err = os.Mkdir("relative", 0755) + Expect(err).To(BeNil()) + containerFilePath := filepath.Join("relative", "Containerfile") + fmt.Println(containerFilePath) + err = ioutil.WriteFile(containerFilePath, []byte(containerFile), 0755) + Expect(err).To(BeNil()) + build := podmanTest.Podman([]string{"build", "-f", "./relative/Containerfile"}) + build.WaitWithDefaultTimeout() + Expect(build).To(Exit(0)) + err = os.RemoveAll("relative") + Expect(err).To(BeNil()) + }) }) 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")) + + }) }) diff --git a/test/e2e/run_device_test.go b/test/e2e/run_device_test.go index fbf1eb791..4eb03dfff 100644 --- a/test/e2e/run_device_test.go +++ b/test/e2e/run_device_test.go @@ -109,7 +109,7 @@ var _ = Describe("Podman run device", func() { err = cmd.Run() Expect(err).To(BeNil()) - session := podmanTest.Podman([]string{"run", "-q", "--security-opt", "label=disable", "--device", "myKmsg", ALPINE, "test", "-c", "/dev/kmsg1"}) + session := podmanTest.Podman([]string{"run", "-q", "--security-opt", "label=disable", "--device", "vendor.com/device=myKmsg", ALPINE, "test", "-c", "/dev/kmsg1"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) }) |