Merge pull request #3668 from epowell/master
Add new interface method to the 'none' communicator
This commit is contained in:
commit
ac78b57ed0
|
@ -38,3 +38,7 @@ func (c *comm) UploadDir(dst string, src string, excl []string) error {
|
||||||
func (c *comm) Download(path string, output io.Writer) error {
|
func (c *comm) Download(path string, output io.Writer) error {
|
||||||
return errors.New("Download is not implemented when communicator = 'none'")
|
return errors.New("Download is not implemented when communicator = 'none'")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *comm) DownloadDir(dst string, src string, excl []string) error {
|
||||||
|
return errors.New("DownloadDir is not implemented when communicator = 'none'")
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package none
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/mitchellh/packer/packer"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestCommIsCommunicator(t *testing.T) {
|
||||||
|
var raw interface{}
|
||||||
|
raw = &comm{}
|
||||||
|
if _, ok := raw.(packer.Communicator); !ok {
|
||||||
|
t.Fatalf("comm must be a communicator")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue