From 35ba77e0409036c455f85d9f8fcbe361f0693335 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Fri, 19 Jul 2019 16:19:17 -0400 Subject: Update e2e tests for remote exec including changing -l to the container id and separating a case of setting the env that remote can't handle Signed-off-by: Peter Hunt --- pkg/varlinkapi/virtwriter/virtwriter.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'pkg/varlinkapi/virtwriter/virtwriter.go') diff --git a/pkg/varlinkapi/virtwriter/virtwriter.go b/pkg/varlinkapi/virtwriter/virtwriter.go index 23f945704..8cdedeed8 100644 --- a/pkg/varlinkapi/virtwriter/virtwriter.go +++ b/pkg/varlinkapi/virtwriter/virtwriter.go @@ -113,7 +113,7 @@ func Reader(r *bufio.Reader, output, errput, input io.Writer, resize chan remote if output != nil { _, err := io.CopyN(output, r, messageSize) if err != nil { - return errors.Wrapf(err, "issue stdout") + return errors.Wrapf(err, "issue stdout") } } case ToStderr: @@ -121,14 +121,14 @@ func Reader(r *bufio.Reader, output, errput, input io.Writer, resize chan remote _, err := io.CopyN(errput, r, messageSize) if err != nil { return err - return errors.Wrapf(err, "issue stderr") + return errors.Wrapf(err, "issue stderr") } } case ToStdin: if input != nil { _, err := io.CopyN(input, r, messageSize) if err != nil { - return errors.Wrapf(err, "issue stdin") + return errors.Wrapf(err, "issue stdin") } } case TerminalResize: @@ -159,7 +159,7 @@ func Reader(r *bufio.Reader, output, errput, input io.Writer, resize chan remote } if execEcChan != nil { ecInt := binary.BigEndian.Uint32(out) - execEcChan <-int(ecInt) + execEcChan <- int(ecInt) } return nil @@ -175,8 +175,7 @@ func HangUp(writer *bufio.Writer, ec int) (err error) { n := 0 msg := make([]byte, 4) - binary.LittleEndian.PutUint32(msg, uint32(ec)) - + binary.BigEndian.PutUint32(msg, uint32(ec)) writeQuit := NewVirtWriteCloser(writer, Quit) if n, err = writeQuit.Write(msg); err != nil { -- cgit v1.2.3-54-g00ecf