Correctly print STDOUT on non-terminal remote exec

I confused STDIN and STDOUT's file descriptors (it's 0 and 1, I
thought they were 1 and 0). As such, we were looking at whether
we wanted to print STDIN when we looked to print STDOUT. This
bool was set when `-i` was set in at the `podman exec` command
line, which masked the problem when it was set.

Fixes #6890
Fixes #6891
Fixes #6892

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
Matthew Heon
2020-07-10 16:17:34 -04:00
parent 2ac8c69534
commit be4b4bd862
2 changed files with 4 additions and 9 deletions

View File

@ -79,7 +79,6 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec environment test", func() {
Skip(v2remotefail)
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
@ -99,7 +98,6 @@ var _ = Describe("Podman exec", func() {
It("podman exec os.Setenv env", func() {
// remote doesn't properly interpret os.Setenv
SkipIfRemote()
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
@ -159,7 +157,6 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec with user only in container", func() {
Skip(v2remotefail)
testUser := "test123"
setup := podmanTest.Podman([]string{"run", "--name", "test1", "-d", fedoraMinimal, "sleep", "60"})
setup.WaitWithDefaultTimeout()
@ -176,7 +173,6 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec with user from run", func() {
Skip(v2remotefail)
testUser := "guest"
setup := podmanTest.Podman([]string{"run", "--user", testUser, "-d", ALPINE, "top"})
setup.WaitWithDefaultTimeout()
@ -196,7 +192,6 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec simple working directory test", func() {
Skip(v2remotefail)
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))