a test for windows. WinRM needs a special validation.

https://github.com/jetbrains-infra/packer-builder-vsphere/issues/92#issuecomment-386486758
This commit is contained in:
Michael Kuzmin 2018-12-18 01:34:48 +03:00 committed by Michael Kuzmin
parent 8a75761898
commit 15d8587344
2 changed files with 41 additions and 1 deletions

View File

@ -631,3 +631,41 @@ func checkNotes(t *testing.T) builderT.TestCheckFunc {
return nil return nil
} }
} }
func TestCloneBuilderAcc_windows(t *testing.T) {
t.Skip("test is too slow")
config := windowsConfig()
builderT.Test(t, builderT.TestCase{
Builder: &Builder{},
Template: commonT.RenderConfig(config),
})
}
func windowsConfig() map[string]interface{} {
username := os.Getenv("VSPHERE_USERNAME")
if username == "" {
username = "root"
}
password := os.Getenv("VSPHERE_PASSWORD")
if password == "" {
password = "jetbrains"
}
config := map[string]interface{}{
"vcenter_server": "vcenter.vsphere65.test",
"username": username,
"password": password,
"insecure_connection": true,
"vm_name": commonT.NewVMName(),
"template": "windows",
"host": "esxi-1.vsphere65.test",
"linked_clone": true, // speed up
"communicator": "winrm",
"winrm_username": "jetbrains",
"winrm_password": "jetbrains",
}
return config
}

View File

@ -387,6 +387,7 @@ func createFloppyConfig(filePath string) string {
} }
func TestISOBuilderAcc_full(t *testing.T) { func TestISOBuilderAcc_full(t *testing.T) {
t.Skip("test is too slow")
config := fullConfig() config := fullConfig()
builderT.Test(t, builderT.TestCase{ builderT.Test(t, builderT.TestCase{
Builder: &Builder{}, Builder: &Builder{},
@ -414,7 +415,7 @@ func fullConfig() map[string]interface{} {
"vm_name": commonT.NewVMName(), "vm_name": commonT.NewVMName(),
"host": "esxi-1.vsphere65.test", "host": "esxi-1.vsphere65.test",
"RAM": 1024, "RAM": 1024,
"disk_controller_type": "pvscsi", "disk_controller_type": "pvscsi",
"disk_size": 4096, "disk_size": 4096,
"disk_thin_provisioned": true, "disk_thin_provisioned": true,
@ -486,6 +487,7 @@ func checkFull(t *testing.T) builderT.TestCheckFunc {
} }
func TestISOBuilderAcc_bootOrder(t *testing.T) { func TestISOBuilderAcc_bootOrder(t *testing.T) {
t.Skip("test is too slow")
config := fullConfig() config := fullConfig()
config["boot_order"] = "disk,cdrom,floppy" config["boot_order"] = "disk,cdrom,floppy"