diff options
Diffstat (limited to 'test/e2e/exec_test.go')
-rw-r--r-- | test/e2e/exec_test.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go index 5d0d6e689..8b95794d2 100644 --- a/test/e2e/exec_test.go +++ b/test/e2e/exec_test.go @@ -244,15 +244,17 @@ var _ = Describe("Podman exec", func() { }) 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"}) + devNull, err := os.Open("/dev/null") + Expect(err).To(BeNil()) + defer devNull.Close() + files := []*os.File{ + devNull, + } + session := podmanTest.PodmanExtraFiles([]string{"exec", "--preserve-fds", "1", "test1", "ls"}, files) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) }) |