diff --git a/builder/amazonebs/builder_test.go b/builder/amazonebs/builder_test.go index 475da8d89..18776cfc5 100644 --- a/builder/amazonebs/builder_test.go +++ b/builder/amazonebs/builder_test.go @@ -7,12 +7,12 @@ import ( func testConfig() map[string]interface{} { return map[string]interface{}{ - "access_key": "foo", - "secret_key": "bar", - "source_ami": "foo", + "access_key": "foo", + "secret_key": "bar", + "source_ami": "foo", "instance_type": "foo", - "region": "us-east-1", - "ssh_username": "root", + "region": "us-east-1", + "ssh_username": "root", } } diff --git a/builder/vmware/step_wait_for_ssh.go b/builder/vmware/step_wait_for_ssh.go index b55c9ebe2..6fea3415e 100644 --- a/builder/vmware/step_wait_for_ssh.go +++ b/builder/vmware/step_wait_for_ssh.go @@ -45,6 +45,7 @@ func (s *stepWaitForSSH) Run(state map[string]interface{}) multistep.StepAction log.Printf("Waiting for SSH, up to timeout: %s", config.SSHWaitTimeout.String()) timeout := time.After(config.SSHWaitTimeout) +WaitLoop: for { // Wait for either SSH to become available, a timeout to occur, // or an interrupt to come through. @@ -56,7 +57,7 @@ func (s *stepWaitForSSH) Run(state map[string]interface{}) multistep.StepAction } state["communicator"] = comm - break + break WaitLoop case <-timeout: ui.Error("Timeout waiting for SSH.") s.cancel = true