Add test: We shouldn't error when main remote options are unset

pull/6424/head
DanHam 8 years ago
parent efcdf60d96
commit 939aa7e289
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E

@ -168,6 +168,20 @@ func TestBuilderPrepare_RemoteType(t *testing.T) {
t.Fatal("should have error")
}
// Good
config["remote_type"] = ""
config["remote_host"] = ""
config["remote_password"] = ""
config["remote_private_key_file"] = ""
b = Builder{}
warns, err = b.Prepare(config)
if len(warns) > 0 {
t.Fatalf("bad: %#v", warns)
}
if err != nil {
t.Fatalf("should not have error: %s", err)
}
// Good
config["remote_type"] = "esx5"
config["remote_host"] = "foobar.example.com"

Loading…
Cancel
Save