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:
parent
8a75761898
commit
15d8587344
|
@ -631,3 +631,41 @@ func checkNotes(t *testing.T) builderT.TestCheckFunc {
|
|||
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
|
||||
}
|
||||
|
|
|
@ -387,6 +387,7 @@ func createFloppyConfig(filePath string) string {
|
|||
}
|
||||
|
||||
func TestISOBuilderAcc_full(t *testing.T) {
|
||||
t.Skip("test is too slow")
|
||||
config := fullConfig()
|
||||
builderT.Test(t, builderT.TestCase{
|
||||
Builder: &Builder{},
|
||||
|
@ -414,7 +415,7 @@ func fullConfig() map[string]interface{} {
|
|||
"vm_name": commonT.NewVMName(),
|
||||
"host": "esxi-1.vsphere65.test",
|
||||
|
||||
"RAM": 1024,
|
||||
"RAM": 1024,
|
||||
"disk_controller_type": "pvscsi",
|
||||
"disk_size": 4096,
|
||||
"disk_thin_provisioned": true,
|
||||
|
@ -486,6 +487,7 @@ func checkFull(t *testing.T) builderT.TestCheckFunc {
|
|||
}
|
||||
|
||||
func TestISOBuilderAcc_bootOrder(t *testing.T) {
|
||||
t.Skip("test is too slow")
|
||||
config := fullConfig()
|
||||
config["boot_order"] = "disk,cdrom,floppy"
|
||||
|
||||
|
|
Loading…
Reference in New Issue