packer-cn/builder/virtualbox/common/hw_config_test.go
Adrien Delorme c11ef90cb6 use interpolate.NewContext() instead of testConfigTemplate(t)
because it's what's happenning there
2019-06-14 12:17:28 +02:00

23 lines
397 B
Go

package common
import (
"testing"
"github.com/hashicorp/packer/template/interpolate"
)
func TestHWConfigPrepare(t *testing.T) {
c := new(HWConfig)
if errs := c.Prepare(interpolate.NewContext()); len(errs) > 0 {
t.Fatalf("err: %#v", errs)
}
if c.CpuCount < 1 {
t.Errorf("bad cpu count: %d", c.CpuCount)
}
if c.MemorySize < 64 {
t.Errorf("bad memory size: %d", c.MemorySize)
}
}