packer-cn/builder/vmware/common/vmx_config_test.go

23 lines
342 B
Go
Raw Normal View History

2013-12-26 17:14:19 -05:00
package common
import (
"testing"
)
func TestVMXConfigPrepare(t *testing.T) {
c := new(VMXConfig)
c.VMXData = map[string]string{
"one": "foo",
"two": "bar",
}
errs := c.Prepare(testConfigTemplate(t))
if len(errs) > 0 {
t.Fatalf("bad: %#v", errs)
}
if len(c.VMXData) != 2 {
t.Fatal("should have two items in VMXData")
}
}