|
|
|
@ -30,10 +30,14 @@ func TestMapFromVMWithEmptyTags(t *testing.T) {
|
|
|
|
|
name := "name"
|
|
|
|
|
vmType := "type"
|
|
|
|
|
location := "westeurope"
|
|
|
|
|
computerName := "computer_name"
|
|
|
|
|
networkProfile := compute.NetworkProfile{
|
|
|
|
|
NetworkInterfaces: &[]compute.NetworkInterfaceReference{},
|
|
|
|
|
}
|
|
|
|
|
properties := &compute.VirtualMachineProperties{
|
|
|
|
|
OsProfile: &compute.OSProfile{
|
|
|
|
|
ComputerName: &computerName,
|
|
|
|
|
},
|
|
|
|
|
StorageProfile: &compute.StorageProfile{
|
|
|
|
|
OsDisk: &compute.OSDisk{
|
|
|
|
|
OsType: "Linux",
|
|
|
|
@ -54,6 +58,7 @@ func TestMapFromVMWithEmptyTags(t *testing.T) {
|
|
|
|
|
expectedVM := virtualMachine{
|
|
|
|
|
ID: id,
|
|
|
|
|
Name: name,
|
|
|
|
|
ComputerName: computerName,
|
|
|
|
|
Type: vmType,
|
|
|
|
|
Location: location,
|
|
|
|
|
OsType: "Linux",
|
|
|
|
@ -71,6 +76,7 @@ func TestMapFromVMWithTags(t *testing.T) {
|
|
|
|
|
name := "name"
|
|
|
|
|
vmType := "type"
|
|
|
|
|
location := "westeurope"
|
|
|
|
|
computerName := "computer_name"
|
|
|
|
|
tags := map[string]*string{
|
|
|
|
|
"prometheus": new(string),
|
|
|
|
|
}
|
|
|
|
@ -78,6 +84,9 @@ func TestMapFromVMWithTags(t *testing.T) {
|
|
|
|
|
NetworkInterfaces: &[]compute.NetworkInterfaceReference{},
|
|
|
|
|
}
|
|
|
|
|
properties := &compute.VirtualMachineProperties{
|
|
|
|
|
OsProfile: &compute.OSProfile{
|
|
|
|
|
ComputerName: &computerName,
|
|
|
|
|
},
|
|
|
|
|
StorageProfile: &compute.StorageProfile{
|
|
|
|
|
OsDisk: &compute.OSDisk{
|
|
|
|
|
OsType: "Linux",
|
|
|
|
@ -98,6 +107,7 @@ func TestMapFromVMWithTags(t *testing.T) {
|
|
|
|
|
expectedVM := virtualMachine{
|
|
|
|
|
ID: id,
|
|
|
|
|
Name: name,
|
|
|
|
|
ComputerName: computerName,
|
|
|
|
|
Type: vmType,
|
|
|
|
|
Location: location,
|
|
|
|
|
OsType: "Linux",
|
|
|
|
@ -115,10 +125,14 @@ func TestMapFromVMScaleSetVMWithEmptyTags(t *testing.T) {
|
|
|
|
|
name := "name"
|
|
|
|
|
vmType := "type"
|
|
|
|
|
location := "westeurope"
|
|
|
|
|
computerName := "computer_name"
|
|
|
|
|
networkProfile := compute.NetworkProfile{
|
|
|
|
|
NetworkInterfaces: &[]compute.NetworkInterfaceReference{},
|
|
|
|
|
}
|
|
|
|
|
properties := &compute.VirtualMachineScaleSetVMProperties{
|
|
|
|
|
OsProfile: &compute.OSProfile{
|
|
|
|
|
ComputerName: &computerName,
|
|
|
|
|
},
|
|
|
|
|
StorageProfile: &compute.StorageProfile{
|
|
|
|
|
OsDisk: &compute.OSDisk{
|
|
|
|
|
OsType: "Linux",
|
|
|
|
@ -140,6 +154,7 @@ func TestMapFromVMScaleSetVMWithEmptyTags(t *testing.T) {
|
|
|
|
|
expectedVM := virtualMachine{
|
|
|
|
|
ID: id,
|
|
|
|
|
Name: name,
|
|
|
|
|
ComputerName: computerName,
|
|
|
|
|
Type: vmType,
|
|
|
|
|
Location: location,
|
|
|
|
|
OsType: "Linux",
|
|
|
|
@ -158,6 +173,7 @@ func TestMapFromVMScaleSetVMWithTags(t *testing.T) {
|
|
|
|
|
name := "name"
|
|
|
|
|
vmType := "type"
|
|
|
|
|
location := "westeurope"
|
|
|
|
|
computerName := "computer_name"
|
|
|
|
|
tags := map[string]*string{
|
|
|
|
|
"prometheus": new(string),
|
|
|
|
|
}
|
|
|
|
@ -165,6 +181,9 @@ func TestMapFromVMScaleSetVMWithTags(t *testing.T) {
|
|
|
|
|
NetworkInterfaces: &[]compute.NetworkInterfaceReference{},
|
|
|
|
|
}
|
|
|
|
|
properties := &compute.VirtualMachineScaleSetVMProperties{
|
|
|
|
|
OsProfile: &compute.OSProfile{
|
|
|
|
|
ComputerName: &computerName,
|
|
|
|
|
},
|
|
|
|
|
StorageProfile: &compute.StorageProfile{
|
|
|
|
|
OsDisk: &compute.OSDisk{
|
|
|
|
|
OsType: "Linux",
|
|
|
|
@ -186,6 +205,7 @@ func TestMapFromVMScaleSetVMWithTags(t *testing.T) {
|
|
|
|
|
expectedVM := virtualMachine{
|
|
|
|
|
ID: id,
|
|
|
|
|
Name: name,
|
|
|
|
|
ComputerName: computerName,
|
|
|
|
|
Type: vmType,
|
|
|
|
|
Location: location,
|
|
|
|
|
OsType: "Linux",
|
|
|
|
|