diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/exec_test.go | 3 | ||||
-rw-r--r-- | test/e2e/run_test.go | 12 | ||||
-rw-r--r-- | test/system/075-exec.bats | 9 | ||||
-rw-r--r-- | test/system/120-load.bats | 2 | ||||
-rw-r--r-- | test/utils/utils.go | 4 |
5 files changed, 25 insertions, 5 deletions
diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go index f5d15d3bd..055546f88 100644 --- a/test/e2e/exec_test.go +++ b/test/e2e/exec_test.go @@ -210,7 +210,6 @@ var _ = Describe("Podman exec", func() { }) It("podman exec missing working directory test", func() { - Skip(v2remotefail) setup := podmanTest.RunTopContainer("test1") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -225,7 +224,6 @@ var _ = Describe("Podman exec", func() { }) It("podman exec cannot be invoked", func() { - Skip(v2remotefail) setup := podmanTest.RunTopContainer("test1") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) @@ -236,7 +234,6 @@ var _ = Describe("Podman exec", func() { }) It("podman exec command not found", func() { - Skip(v2remotefail) setup := podmanTest.RunTopContainer("test1") setup.WaitWithDefaultTimeout() Expect(setup.ExitCode()).To(Equal(0)) diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 574c5c3f2..9cb76d1f6 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -1142,4 +1142,16 @@ USER mail` Expect(session.ExitCode()).To(Not(Equal(0))) Expect(session.ErrorToString()).To(ContainSubstring("Invalid umask")) }) + + It("podman run makes entrypoint from image", func() { + // BuildImage does not seem to work remote + SkipIfRemote() + dockerfile := `FROM busybox +WORKDIR /madethis` + podmanTest.BuildImage(dockerfile, "test", "false") + session := podmanTest.Podman([]string{"run", "--rm", "test", "pwd"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.OutputToString()).To(ContainSubstring("/madethis")) + }) }) diff --git a/test/system/075-exec.bats b/test/system/075-exec.bats index b2c49510a..aa6e2bd28 100644 --- a/test/system/075-exec.bats +++ b/test/system/075-exec.bats @@ -19,6 +19,15 @@ load helpers run_podman exec $cid sh -c "cat /$rand_filename" is "$output" "$rand_content" "Can exec and see file in running container" + + # Specially defined situations: exec a dir, or no such command. + # We don't check the full error message because runc & crun differ. + run_podman 126 exec $cid /etc + is "$output" ".*permission denied" "podman exec /etc" + run_podman 127 exec $cid /no/such/command + is "$output" ".*such file or dir" "podman exec /no/such/command" + + # Done run_podman exec $cid rm -f /$rand_filename run_podman wait $cid diff --git a/test/system/120-load.bats b/test/system/120-load.bats index ccfbc51ca..4825eed07 100644 --- a/test/system/120-load.bats +++ b/test/system/120-load.bats @@ -77,8 +77,6 @@ verify_iid_and_name() { } @test "podman load - NAME and NAME:TAG arguments work" { - skip_if_remote "FIXME: pending #7124" - get_iid_and_name run_podman save $iid -o $archive run_podman rmi $iid diff --git a/test/utils/utils.go b/test/utils/utils.go index 2c454f532..b279a7084 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -207,6 +207,10 @@ func WaitContainerReady(p PodmanTestCommon, id string, expStr string, timeout in // OutputToString formats session output to string func (s *PodmanSession) OutputToString() string { + if s == nil || s.Out == nil || s.Out.Contents() == nil { + return "" + } + fields := strings.Fields(string(s.Out.Contents())) return strings.Join(fields, " ") } |