Skip to content

Commit

Permalink
compute - Fix tests for 4.0 (#27066)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbfrahry authored Aug 16, 2024
1 parent 2127ae9 commit ec5675f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1629,10 +1629,11 @@ resource "azurerm_virtual_network" "test" {
}
resource "azurerm_subnet" "test" {
name = "internal"
resource_group_name = azurerm_resource_group.test.name
virtual_network_name = azurerm_virtual_network.test.name
address_prefixes = ["10.0.2.0/24"]
name = "internal"
resource_group_name = azurerm_resource_group.test.name
virtual_network_name = azurerm_virtual_network.test.name
address_prefixes = ["10.0.2.0/24"]
default_outbound_access_enabled = false
}
resource "azurerm_network_interface" "test" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,9 @@ func TestAccLinuxVirtualMachineScaleSet_otherTerminationNotification(t *testing.

// TODO remove TestAccLinuxVirtualMachineScaleSet_otherTerminationNotificationMigration in 4.0
func TestAccLinuxVirtualMachineScaleSet_otherTerminationNotificationMigration(t *testing.T) {
if features.FourPointOhBeta() {
t.Skip("removing in 4.0")
}
data := acceptance.BuildTestData(t, "azurerm_linux_virtual_machine_scale_set", "test")
r := LinuxVirtualMachineScaleSetResource{}

Expand Down Expand Up @@ -1248,10 +1251,12 @@ resource "azurerm_virtual_network" "test" {
}
resource "azurerm_subnet" "test" {
name = "internal"
resource_group_name = azurerm_resource_group.test.name
virtual_network_name = azurerm_virtual_network.test.name
address_prefixes = ["10.0.2.0/24"]
name = "internal"
resource_group_name = azurerm_resource_group.test.name
virtual_network_name = azurerm_virtual_network.test.name
address_prefixes = ["10.0.2.0/24"]
default_outbound_access_enabled = false
}
resource "azurerm_linux_virtual_machine_scale_set" "test" {
Expand Down Expand Up @@ -2035,6 +2040,7 @@ resource "azurerm_linux_virtual_machine_scale_set" "test" {
disable_password_authentication = false
provision_vm_agent = %t
extension_operations_enabled = false
source_image_reference {
publisher = "Canonical"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1552,6 +1552,8 @@ resource "azurerm_orchestrated_virtual_machine_scale_set" "test" {
sku_name = "Standard_F2"
instances = 1
extension_operations_enabled = false
os_profile {
linux_configuration {
computer_name_prefix = "testvm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,9 @@ func TestAccWindowsVirtualMachineScaleSet_otherTerminationNotification(t *testin

// TODO remove TestAccWindowsVirtualMachineScaleSet_otherTerminationNotificationMigration in 4.0
func TestAccWindowsVirtualMachineScaleSet_otherTerminationNotificationMigration(t *testing.T) {
if features.FourPointOhBeta() {
t.Skip("this test is being removed in 4.0")
}
data := acceptance.BuildTestData(t, "azurerm_windows_virtual_machine_scale_set", "test")
r := WindowsVirtualMachineScaleSetResource{}

Expand Down Expand Up @@ -2221,14 +2224,16 @@ func (r WindowsVirtualMachineScaleSetResource) otherVMAgent(data acceptance.Test
%s
resource "azurerm_windows_virtual_machine_scale_set" "test" {
name = local.vm_name
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
sku = "Standard_F2"
instances = 1
admin_username = "adminuser"
admin_password = "P@ssword1234!"
provision_vm_agent = %t
name = local.vm_name
resource_group_name = azurerm_resource_group.test.name
location = azurerm_resource_group.test.location
sku = "Standard_F2"
instances = 1
admin_username = "adminuser"
admin_password = "P@ssword1234!"
provision_vm_agent = %t
extension_operations_enabled = false
source_image_reference {
publisher = "MicrosoftWindowsServer"
Expand Down Expand Up @@ -2841,6 +2846,7 @@ resource "azurerm_public_ip" "test" {
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
allocation_method = "Dynamic"
sku = "Basic"
idle_timeout_in_minutes = 4
}
Expand Down Expand Up @@ -2951,6 +2957,7 @@ resource "azurerm_public_ip" "test" {
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
allocation_method = "Dynamic"
sku = "Basic"
idle_timeout_in_minutes = 4
}
Expand Down

0 comments on commit ec5675f

Please sign in to comment.