Commit 496a320a authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer/rpc: Implement full communicator interface

parent 2799cccf
......@@ -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")
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment