Commit Graph

5 Commits

Author SHA1 Message Date
James Bardin d130add682 udpate communicator package to use new types 2020-12-02 12:45:00 -05:00
James Bardin 590615f7c3 update communicators to use legacy types 2020-12-02 12:16:35 -05:00
James Bardin 2954d9849a add some more functionality to MockCommunicator 2018-03-20 14:23:32 -04:00
James Bardin 2d7dc605a0 get communicator errors from a remote.Cmd
The remote.Cmd struct could not convey any transport related error to
the caller, meaning that interrupted commands would show that they
succeeded.

Change Cmd.SetExited to accept an exit status, as well as an error to
store for the caller.  Make the status and error fields internal,
require serialized access through the getter methods.

Users of remote.Cmd should not check both Cmd.Err() and Cmd.ExitStatus()
until after Wait returns.

Require communicators to call Cmd.Init before executing the command.
This will indicate incorrect usage of the remote.Cmd by causing a panic
in SetExitStatus.
2018-03-15 16:03:20 -04:00
Sander van Harmelen d4150d5b1a Adding the tests... 2015-05-08 18:17:57 +02:00