2013-05-24 01:38:40 -04:00
|
|
|
package shell
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/mitchellh/packer/packer"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestProvisioner_Impl(t *testing.T) {
|
|
|
|
var raw interface{}
|
|
|
|
raw = &Provisioner{}
|
|
|
|
if _, ok := raw.(packer.Provisioner); !ok {
|
|
|
|
t.Fatalf("must be a Provisioner")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-27 18:06:34 -04:00
|
|
|
func TestProvisionerPrepare_Defaults(t *testing.T) {
|
2013-06-01 20:57:26 -04:00
|
|
|
raw := map[string]interface{}{}
|
2013-05-27 18:06:34 -04:00
|
|
|
|
|
|
|
p := &Provisioner{}
|
|
|
|
p.Prepare(raw, nil)
|
|
|
|
|
|
|
|
if p.config.RemotePath != DefaultRemotePath {
|
|
|
|
t.Errorf("unexpected remote path: %s", p.config.RemotePath)
|
|
|
|
}
|
|
|
|
}
|