diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/run_test.go | 15 | ||||
-rw-r--r-- | test/e2e/run_volume_test.go | 18 | ||||
-rw-r--r-- | test/install/Dockerfile.Fedora | 2 | ||||
-rw-r--r-- | test/test_podman_build.sh | 14 |
4 files changed, 38 insertions, 11 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 3ba3c2bb3..3fc628589 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -712,28 +712,25 @@ USER mail` Expect(session.OutputToString()).To(Not(ContainSubstring("/dev/shm type tmpfs (ro,"))) }) - It("podman run with bad healthcheck interval", func() { - session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-cmd", "foo", "--healthcheck-interval", "0.5s", ALPINE, "top"}) - session.Wait() - Expect(session.ExitCode()).ToNot(Equal(0)) - }) - It("podman run with bad healthcheck retries", func() { - session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-cmd", "foo", "--healthcheck-retries", "0", ALPINE, "top"}) + session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "foo", "--healthcheck-retries", "0", ALPINE, "top"}) session.Wait() Expect(session.ExitCode()).ToNot(Equal(0)) + Expect(session.ErrorToString()).To(ContainSubstring("healthcheck-retries must be greater than 0")) }) It("podman run with bad healthcheck timeout", func() { - session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-cmd", "foo", "--healthcheck-timeout", "0s", ALPINE, "top"}) + session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "foo", "--healthcheck-timeout", "0s", ALPINE, "top"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).ToNot(Equal(0)) + Expect(session.ErrorToString()).To(ContainSubstring("healthcheck-timeout must be at least 1 second")) }) It("podman run with bad healthcheck start-period", func() { - session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-cmd", "foo", "--healthcheck-start-period", "-1s", ALPINE, "top"}) + session := podmanTest.Podman([]string{"run", "-dt", "--healthcheck-command", "foo", "--healthcheck-start-period", "-1s", ALPINE, "top"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).ToNot(Equal(0)) + Expect(session.ErrorToString()).To(ContainSubstring("healthcheck-start-period must be 0 seconds or greater")) }) It("podman run with --add-host and --no-hosts fails", func() { diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index d89c80909..9e160e73c 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -63,6 +63,24 @@ var _ = Describe("Podman run with volumes", func() { Expect(found).Should(BeTrue()) Expect(matches[0]).To(ContainSubstring("rw")) Expect(matches[0]).To(ContainSubstring("shared")) + + // Cached is ignored + session = podmanTest.Podman([]string{"run", "--rm", "-v", fmt.Sprintf("%s:/run/test:cached", mountPath), ALPINE, "grep", "/run/test", "/proc/self/mountinfo"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + found, matches = session.GrepString("/run/test") + Expect(found).Should(BeTrue()) + Expect(matches[0]).To(ContainSubstring("rw")) + Expect(matches[0]).To(Not(ContainSubstring("cached"))) + + // Delegated is ignored + session = podmanTest.Podman([]string{"run", "--rm", "-v", fmt.Sprintf("%s:/run/test:delegated", mountPath), ALPINE, "grep", "/run/test", "/proc/self/mountinfo"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + found, matches = session.GrepString("/run/test") + Expect(found).Should(BeTrue()) + Expect(matches[0]).To(ContainSubstring("rw")) + Expect(matches[0]).To(Not(ContainSubstring("delegated"))) }) It("podman run with --mount flag", func() { diff --git a/test/install/Dockerfile.Fedora b/test/install/Dockerfile.Fedora index 74cee771d..3e7b6e238 100644 --- a/test/install/Dockerfile.Fedora +++ b/test/install/Dockerfile.Fedora @@ -1,3 +1,3 @@ -FROM registry.fedoraproject.org/fedora:29 +FROM registry.fedoraproject.org/fedora:30 RUN dnf install -y rpms/x86_64/* diff --git a/test/test_podman_build.sh b/test/test_podman_build.sh index 39f1e784d..e3e53cae6 100644 --- a/test/test_podman_build.sh +++ b/test/test_podman_build.sh @@ -196,10 +196,22 @@ echo ######################################################## echo test "build with preprocessor" echo ######################################################## - target=alpine-image + TARGET=alpine-image podman build -q -t ${TARGET} -f Decomposed.in $HOME/test/build/preprocess buildah --debug=false images CID=$(buildah from $TARGET) buildah rm $CID podman rmi $(buildah --debug=false images -q) buildah --debug=false images -q + +echo ######################################################## +echo test "build with priv'd RUN" +echo ######################################################## + + TARGET=alpinepriv + podman build -q -t ${TARGET} -f $HOME/test/build/run-privd $HOME/test/build/run-privd + buildah --debug=false images + CID=$(buildah from $TARGET) + buildah rm $CID + podman rmi $(buildah --debug=false images -q) + buildah --debug=false images -q |