mirror of
https://github.com/containers/podman.git
synced 2026-04-02 22:13:26 -04:00
Merge pull request #4043 from haircommander/preserve-fd-fix
exec: fix --preserve-fds
This commit is contained in:
@@ -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))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user