Merge pull request #8170 from alrs/fix-vmware-dropped-errors

builder/vmware: fix dropped test errors
This commit is contained in:
Adrien Delorme 2019-09-30 10:43:28 +02:00 committed by GitHub
commit 93884a81d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -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)

View File

@ -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()

View File

@ -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)