packer/rpc: Implement full communicator interface

This commit is contained in:
Mitchell Hashimoto 2013-05-12 16:19:34 -07:00
parent 2799cccf4b
commit 496a320a82
2 changed files with 8 additions and 4 deletions

View File

@ -87,6 +87,10 @@ func (c *communicator) Start(cmd string) (rc *packer.RemoteCommand, err error) {
return 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) { func (c *CommunicatorServer) Start(cmd *string, reply *CommunicatorStartResponse) (err error) {
// Start executing the command. // Start executing the command.
command, err := c.c.Start(*cmd) command, err := c.c.Start(*cmd)

View File

@ -98,10 +98,10 @@ func TestCommunicatorRPC(t *testing.T) {
} }
func TestCommunicator_ImplementsCommunicator(t *testing.T) { func TestCommunicator_ImplementsCommunicator(t *testing.T) {
//assert := asserts.NewTestingAsserts(t, true) assert := asserts.NewTestingAsserts(t, true)
//var r packer.Communicator var r packer.Communicator
//c := Communicator(nil) c := Communicator(nil)
//assert.Implementor(c, &r, "should be a Communicator") assert.Implementor(c, &r, "should be a Communicator")
} }