packer/rpc: Implement full communicator interface
This commit is contained in:
parent
2799cccf4b
commit
496a320a82
|
@ -87,6 +87,10 @@ func (c *communicator) Start(cmd string) (rc *packer.RemoteCommand, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (c *communicator) Upload(string, io.Reader) {}
|
||||
|
||||
func (c *communicator) Download(string, io.Writer) {}
|
||||
|
||||
func (c *CommunicatorServer) Start(cmd *string, reply *CommunicatorStartResponse) (err error) {
|
||||
// Start executing the command.
|
||||
command, err := c.c.Start(*cmd)
|
||||
|
|
|
@ -98,10 +98,10 @@ func TestCommunicatorRPC(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestCommunicator_ImplementsCommunicator(t *testing.T) {
|
||||
//assert := asserts.NewTestingAsserts(t, true)
|
||||
assert := asserts.NewTestingAsserts(t, true)
|
||||
|
||||
//var r packer.Communicator
|
||||
//c := Communicator(nil)
|
||||
var r packer.Communicator
|
||||
c := Communicator(nil)
|
||||
|
||||
//assert.Implementor(c, &r, "should be a Communicator")
|
||||
assert.Implementor(c, &r, "should be a Communicator")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue