builder/vmware: Test the shutdown timeout

This commit is contained in:
Mitchell Hashimoto 2013-06-06 16:31:21 -07:00
parent 03e22c6323
commit 43b8ec3709
1 changed files with 19 additions and 0 deletions

View File

@ -83,6 +83,25 @@ func TestBuilderPrepare_ISOUrl(t *testing.T) {
}
}
func TestBuilderPrepare_ShutdownTimeout(t *testing.T) {
var b Builder
config := testConfig()
// Test with a bad value
config["shutdown_timeout"] = "this is not good"
err := b.Prepare(config)
if err == nil {
t.Fatal("should have error")
}
// Test with a good one
config["shutdown_timeout"] = "5s"
err = b.Prepare(config)
if err != nil {
t.Fatalf("should not have error: %s", err)
}
}
func TestBuilderPrepare_SSHUser(t *testing.T) {
var b Builder
config := testConfig()