github.com/sneal/packer@v0.5.2/builder/vmware/common/vmx_config_test.go (about)

     1  package common
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestVMXConfigPrepare(t *testing.T) {
     8  	c := new(VMXConfig)
     9  	c.VMXData = map[string]string{
    10  		"one": "foo",
    11  		"two": "bar",
    12  	}
    13  
    14  	errs := c.Prepare(testConfigTemplate(t))
    15  	if len(errs) > 0 {
    16  		t.Fatalf("bad: %#v", errs)
    17  	}
    18  
    19  	if len(c.VMXData) != 2 {
    20  		t.Fatal("should have two items in VMXData")
    21  	}
    22  }