2018-01-24 09:56:14 -05:00
|
|
|
package iso
|
|
|
|
|
|
|
|
import (
|
|
|
|
builderT "github.com/hashicorp/packer/helper/builder/testing"
|
|
|
|
commonT "github.com/jetbrains-infra/packer-builder-vsphere/common/testing"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2018-01-24 13:52:29 -05:00
|
|
|
func TestISOBuilderAcc_default(t *testing.T) {
|
2018-01-24 09:56:14 -05:00
|
|
|
config := defaultConfig()
|
|
|
|
builderT.Test(t, builderT.TestCase{
|
|
|
|
Builder: &Builder{},
|
|
|
|
Template: commonT.RenderConfig(config),
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
func defaultConfig() map[string]interface{} {
|
|
|
|
config := map[string]interface{}{
|
|
|
|
"vcenter_server": "vcenter.vsphere65.test",
|
|
|
|
"username": "root",
|
|
|
|
"password": "jetbrains",
|
|
|
|
"insecure_connection": true,
|
|
|
|
|
|
|
|
"host": "esxi-1.vsphere65.test",
|
|
|
|
|
|
|
|
"ssh_username": "root",
|
|
|
|
"ssh_password": "jetbrains",
|
|
|
|
|
2018-01-24 13:52:29 -05:00
|
|
|
"vm_name": commonT.NewVMName(),
|
2018-01-24 09:56:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return config
|
|
|
|
}
|