2019-03-16 12:18:29 -04:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
2019-06-14 04:55:10 -04:00
|
|
|
|
|
|
|
"github.com/hashicorp/packer/template/interpolate"
|
2019-03-16 12:18:29 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestGuestAdditionsConfigPrepare(t *testing.T) {
|
|
|
|
c := new(GuestAdditionsConfig)
|
|
|
|
var errs []error
|
|
|
|
|
|
|
|
c.GuestAdditionsMode = "disable"
|
|
|
|
c.Communicator = "none"
|
2019-06-14 04:55:10 -04:00
|
|
|
errs = c.Prepare(interpolate.NewContext())
|
2019-03-16 12:18:29 -04:00
|
|
|
if len(errs) > 0 {
|
|
|
|
t.Fatalf("should not have error: %s", errs)
|
|
|
|
}
|
|
|
|
}
|