summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/bindings/containers/attach.go8
-rw-r--r--test/e2e/exec_test.go5
2 files changed, 4 insertions, 9 deletions
diff --git a/pkg/bindings/containers/attach.go b/pkg/bindings/containers/attach.go
index 077bb244f..297563688 100644
--- a/pkg/bindings/containers/attach.go
+++ b/pkg/bindings/containers/attach.go
@@ -457,15 +457,15 @@ func ExecStartAndAttach(ctx context.Context, sessionID string, streams *define.A
switch {
case fd == 0:
- if streams.AttachOutput {
+ if streams.AttachInput {
+ // Write STDIN to STDOUT (echoing characters
+ // typed by another attach session)
if _, err := streams.OutputStream.Write(frame[0:l]); err != nil {
return err
}
}
case fd == 1:
- if streams.AttachInput {
- // Write STDIN to STDOUT (echoing characters
- // typed by another attach session)
+ if streams.AttachOutput {
if _, err := streams.OutputStream.Write(frame[0:l]); err != nil {
return err
}
diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go
index 4f744e401..0e60c4a7d 100644
--- a/test/e2e/exec_test.go
+++ b/test/e2e/exec_test.go
@@ -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))