packer-cn/builder/virtualbox/common/guest_additions_config_test.go

20 lines
370 B
Go
Raw Normal View History

package common
import (
"testing"
"github.com/hashicorp/packer/template/interpolate"
)
func TestGuestAdditionsConfigPrepare(t *testing.T) {
c := new(GuestAdditionsConfig)
var errs []error
c.GuestAdditionsMode = "disable"
c.Communicator = "none"
errs = c.Prepare(interpolate.NewContext())
if len(errs) > 0 {
t.Fatalf("should not have error: %s", errs)
}
}