aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/e2e/cp_test.go4
-rw-r--r--test/e2e/exec_test.go12
-rw-r--r--test/e2e/run_exit_test.go15
-rw-r--r--test/e2e/run_selinux_test.go2
-rw-r--r--test/system/030-run.bats1
-rw-r--r--test/system/065-cp.bats17
6 files changed, 28 insertions, 23 deletions
diff --git a/test/e2e/cp_test.go b/test/e2e/cp_test.go
index edd9c70c6..9b0cb757d 100644
--- a/test/e2e/cp_test.go
+++ b/test/e2e/cp_test.go
@@ -223,7 +223,7 @@ var _ = Describe("Podman cp", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
- session = podmanTest.Podman([]string{"cp", "testctr:testfile", "testfile1"})
+ session = podmanTest.Podman([]string{"cp", "--pause=false", "testctr:testfile", "testfile1"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -233,7 +233,7 @@ var _ = Describe("Podman cp", func() {
Expect(err).To(BeNil())
Expect(strings.Contains(string(cmdRet), "testuser")).To(BeFalse())
- session = podmanTest.Podman([]string{"cp", "testfile1", "testctr:testfile2"})
+ session = podmanTest.Podman([]string{"cp", "--pause=false", "testfile1", "testctr:testfile2"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go
index f3190978c..670269eab 100644
--- a/test/e2e/exec_test.go
+++ b/test/e2e/exec_test.go
@@ -120,6 +120,18 @@ var _ = Describe("Podman exec", func() {
Expect(session.ExitCode()).To(Equal(100))
})
+ It("podman exec pseudo-terminal sanity check", func() {
+ setup := podmanTest.Podman([]string{"run", "--detach", "--name", "test1", fedoraMinimal, "sleep", "+Inf"})
+ setup.WaitWithDefaultTimeout()
+ Expect(setup.ExitCode()).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"exec", "--interactive", "--tty", "test1", "/usr/bin/stty", "--all"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ match, _ := session.GrepString(" onlcr")
+ Expect(match).Should(BeTrue())
+ })
+
It("podman exec simple command with user", func() {
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
diff --git a/test/e2e/run_exit_test.go b/test/e2e/run_exit_test.go
index 861d6b3b7..374705879 100644
--- a/test/e2e/run_exit_test.go
+++ b/test/e2e/run_exit_test.go
@@ -1,10 +1,9 @@
-// +build !remoteclient
-
package integration
import (
"os"
+ "github.com/containers/libpod/libpod/define"
. "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -34,22 +33,22 @@ var _ = Describe("Podman run exit", func() {
})
- It("podman run exit 125", func() {
+ It("podman run exit define.ExecErrorCodeGeneric", func() {
result := podmanTest.Podman([]string{"run", "--foobar", ALPINE, "ls", "$tmp"})
result.WaitWithDefaultTimeout()
- Expect(result.ExitCode()).To(Equal(125))
+ Expect(result.ExitCode()).To(Equal(define.ExecErrorCodeGeneric))
})
- It("podman run exit 126", func() {
+ It("podman run exit ExecErrorCodeCannotInvoke", func() {
result := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
result.WaitWithDefaultTimeout()
- Expect(result.ExitCode()).To(Equal(126))
+ Expect(result.ExitCode()).To(Equal(define.ExecErrorCodeCannotInvoke))
})
- It("podman run exit 127", func() {
+ It("podman run exit ExecErrorCodeNotFound", func() {
result := podmanTest.Podman([]string{"run", ALPINE, "foobar"})
result.WaitWithDefaultTimeout()
- Expect(result.ExitCode()).To(Equal(127))
+ Expect(result.ExitCode()).To(Equal(define.ExecErrorCodeNotFound))
})
It("podman run exit 0", func() {
diff --git a/test/e2e/run_selinux_test.go b/test/e2e/run_selinux_test.go
index dfe71531a..0c78ab15b 100644
--- a/test/e2e/run_selinux_test.go
+++ b/test/e2e/run_selinux_test.go
@@ -162,7 +162,7 @@ var _ = Describe("Podman run", func() {
session = podmanTest.Podman([]string{"run", "-it", "--security-opt", "label=type:spc_t", "--security-opt", "label=filetype:foobar", fedoraMinimal, "ls", "-Z", "/dev"})
session.WaitWithDefaultTimeout()
- Expect(session.ExitCode()).To(Equal(127))
+ Expect(session.ExitCode()).To(Equal(126))
})
})
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index f279a0c75..760ed6a18 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -60,7 +60,6 @@ echo $rand | 0 | $rand
# 'run --rm' goes through different code paths and may lose exit status.
# See https://github.com/containers/libpod/issues/3795
@test "podman run --rm" {
- skip_if_remote "podman-remote does not handle exit codes"
run_podman 0 run --rm $IMAGE /bin/true
run_podman 1 run --rm $IMAGE /bin/false
diff --git a/test/system/065-cp.bats b/test/system/065-cp.bats
index 204065bdb..0ca730a50 100644
--- a/test/system/065-cp.bats
+++ b/test/system/065-cp.bats
@@ -27,13 +27,8 @@ load helpers
"echo $rand_content1 >/tmp/$rand_filename1;
echo $rand_content2 >/tmp/$rand_filename2"
- run_podman cp 'cpcontainer:/tmp/*' $dstdir
-
- test -e $dstdir/$rand_filename1 || die "file 1 not copied from container"
- test -e $dstdir/$rand_filename2 || die "file 2 not copied from container"
-
- is "$(<$dstdir/$rand_filename1)" "$rand_content1" "content of file 1"
- is "$(<$dstdir/$rand_filename2)" "$rand_content2" "content of file 2"
+ # cp no longer supports wildcarding
+ run_podman 125 cp 'cpcontainer:/tmp/*' $dstdir
run_podman rm cpcontainer
}
@@ -150,13 +145,13 @@ load helpers
# Copy file from host into container, into a file named 'x'
# Note that the second has a trailing slash; this will trigger mkdir
- run_podman cp $srcdir/$rand_filename1 cpcontainer:/tmp/d1/x
+ run_podman cp --pause=false $srcdir/$rand_filename1 cpcontainer:/tmp/d1/x
is "$output" "" "output from podman cp 1"
- run_podman cp $srcdir/$rand_filename2 cpcontainer:/tmp/d2/x/
+ run_podman cp --pause=false $srcdir/$rand_filename2 cpcontainer:/tmp/d2/x/
is "$output" "" "output from podman cp 3"
- run_podman cp $srcdir/$rand_filename3 cpcontainer:/tmp/d3/x
+ run_podman cp --pause=false $srcdir/$rand_filename3 cpcontainer:/tmp/d3/x
is "$output" "" "output from podman cp 3"
# Read back.
@@ -205,7 +200,7 @@ load helpers
"mkdir -p $graphroot; trap 'exit 0' 15;while :;do sleep 0.5;done"
# Copy from host into container.
- run_podman cp $srcdir/$rand_filename cpcontainer:$graphroot/$rand_filename
+ run_podman cp --pause=false $srcdir/$rand_filename cpcontainer:$graphroot/$rand_filename
# ls, and confirm it's there.
run_podman exec cpcontainer ls -l $graphroot/$rand_filename