From 2b795053b4795d4bb905d83f68d95c7f680793a6 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Fri, 27 Sep 2019 16:05:12 -0700 Subject: [PATCH] builder/vmware: fix dropped test errors --- builder/vmware/common/driver_esx5_test.go | 3 +++ builder/vmware/common/step_configure_vmx_test.go | 3 +++ builder/vmware/iso/step_create_vmx_test.go | 3 +++ 3 files changed, 9 insertions(+) diff --git a/builder/vmware/common/driver_esx5_test.go b/builder/vmware/common/driver_esx5_test.go index 67b18ee8a..ebe8a0f71 100644 --- a/builder/vmware/common/driver_esx5_test.go +++ b/builder/vmware/common/driver_esx5_test.go @@ -69,6 +69,9 @@ func TestESX5Driver_CommHost(t *testing.T) { var commConfig communicator.Config err := config.Decode(&commConfig, nil, conf) + if err != nil { + t.Fatalf("error decoding config: %v", err) + } state := new(multistep.BasicStateBag) sshConfig := SSHConfig{Comm: commConfig} state.Put("sshConfig", &sshConfig) diff --git a/builder/vmware/common/step_configure_vmx_test.go b/builder/vmware/common/step_configure_vmx_test.go index d06ae51b9..87469f6f1 100644 --- a/builder/vmware/common/step_configure_vmx_test.go +++ b/builder/vmware/common/step_configure_vmx_test.go @@ -17,6 +17,9 @@ func testVMXFile(t *testing.T) string { // displayName must always be set err = WriteVMX(tf.Name(), map[string]string{"displayName": "PackerBuild"}) + if err != nil { + t.Fatalf("error writing .vmx file: %v", err) + } tf.Close() return tf.Name() diff --git a/builder/vmware/iso/step_create_vmx_test.go b/builder/vmware/iso/step_create_vmx_test.go index e9f32e217..9bd4d6d4c 100644 --- a/builder/vmware/iso/step_create_vmx_test.go +++ b/builder/vmware/iso/step_create_vmx_test.go @@ -168,6 +168,9 @@ func setupVMwareBuild(t *testing.T, builderConfig map[string]string, provisioner } warn, err := b.Prepare() + if err != nil { + t.Fatalf("error preparing build: %v", err) + } if len(warn) > 0 { for _, w := range warn { t.Logf("Configuration warning: %s", w)