summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-16 23:23:59 +0200
committerGitHub <noreply@github.com>2019-09-16 23:23:59 +0200
commit42e080bcd342f4a3032fb9921b38b4e711900d52 (patch)
tree662f6459ba1836da4405c8466dd65ac5c3c43620 /test
parent2a4e062c71ecf94aadd8c91ecf8b84e3fb64ce38 (diff)
parent5f97721afc1a1167ec3981bc3caac9be4fdae2ae (diff)
downloadpodman-42e080bcd342f4a3032fb9921b38b4e711900d52.tar.gz
podman-42e080bcd342f4a3032fb9921b38b4e711900d52.tar.bz2
podman-42e080bcd342f4a3032fb9921b38b4e711900d52.zip
Merge pull request #4043 from haircommander/preserve-fd-fix
exec: fix --preserve-fds
Diffstat (limited to 'test')
-rw-r--r--test/e2e/exec_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go
index 670269eab..13fdabb81 100644
--- a/test/e2e/exec_test.go
+++ b/test/e2e/exec_test.go
@@ -2,6 +2,7 @@ package integration
import (
"os"
+ "strings"
. "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo"
@@ -228,4 +229,18 @@ var _ = Describe("Podman exec", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(127))
})
+
+ It("podman exec preserve fds sanity check", func() {
+ // TODO: add this test once crun adds the --preserve-fds flag for exec
+ if strings.Contains(podmanTest.OCIRuntime, "crun") {
+ Skip("Test only works on crun")
+ }
+ setup := podmanTest.RunTopContainer("test1")
+ setup.WaitWithDefaultTimeout()
+ Expect(setup.ExitCode()).To(Equal(0))
+
+ session := podmanTest.Podman([]string{"exec", "--preserve-fds", "1", "test1", "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
})