Skip to content

Commit

Permalink
Block backup vault creation tests to run in parallel (#11939)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehul3217 authored Oct 15, 2024
1 parent 6934054 commit 6ff722b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import (
)

func TestAccNetappBackupPolicy_NetappBackupPolicyFullExample_update(t *testing.T) {
t.Parallel()

context := map[string]interface{}{
"random_suffix": acctest.RandString(t, 10),
}
Expand Down Expand Up @@ -55,7 +53,7 @@ func testAccNetappBackupPolicy_NetappBackupPolicyFullExample_basic(context map[s
return acctest.Nprintf(`
resource "google_netapp_backup_policy" "test_backup_policy_full" {
name = "tf-test-test-backup-policy-full%{random_suffix}"
location = "us-central1"
location = "us-east4"
daily_backup_limit = 2
weekly_backup_limit = 0
monthly_backup_limit = 0
Expand All @@ -68,7 +66,7 @@ func testAccNetappBackupPolicy_NetappBackupPolicyFullExample_updates(context map
return acctest.Nprintf(`
resource "google_netapp_backup_policy" "test_backup_policy_full" {
name = "tf-test-test-backup-policy-full%{random_suffix}"
location = "us-central1"
location = "us-east4"
daily_backup_limit = 6
weekly_backup_limit = 4
monthly_backup_limit = 3
Expand All @@ -86,7 +84,7 @@ func testAccNetappBackupPolicy_NetappBackupPolicyFullExample_disable(context map
return acctest.Nprintf(`
resource "google_netapp_backup_policy" "test_backup_policy_full" {
name = "tf-test-test-backup-policy-full%{random_suffix}"
location = "us-central1"
location = "us-east4"
daily_backup_limit = 2
weekly_backup_limit = 1
monthly_backup_limit = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ data "google_compute_network" "default" {
resource "google_netapp_storage_pool" "default" {
name = "tf-test-backup-pool%{random_suffix}"
location = "us-central1"
location = "us-west2"
service_level = "PREMIUM"
capacity_gib = "2048"
network = data.google_compute_network.default.id
Expand Down Expand Up @@ -110,7 +110,7 @@ data "google_compute_network" "default" {
resource "google_netapp_storage_pool" "default" {
name = "tf-test-backup-pool%{random_suffix}"
location = "us-central1"
location = "us-west2"
service_level = "PREMIUM"
capacity_gib = "2048"
network = data.google_compute_network.default.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
)

func TestAccNetappBackupVault_NetappBackupVaultExample_update(t *testing.T) {
t.Parallel()

context := map[string]interface{}{
"random_suffix": acctest.RandString(t, 10),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ func testAccNetappVolume_volumeBasicExample_basic(context map[string]interface{}
return acctest.Nprintf(`
resource "google_netapp_storage_pool" "default" {
name = "tf-test-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "PREMIUM"
capacity_gib = "2048"
network = data.google_compute_network.default.id
}
resource "google_netapp_volume" "test_volume" {
location = "us-west2"
location = "us-west4"
name = "tf-test-test-volume%{random_suffix}"
capacity_gib = "100"
share_name = "tf-test-test-volume%{random_suffix}"
Expand All @@ -137,22 +137,22 @@ func testAccNetappVolume_volumeBasicExample_full(context map[string]interface{})
return acctest.Nprintf(`
resource "google_netapp_storage_pool" "default" {
name = "tf-test-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "PREMIUM"
capacity_gib = "2048"
network = data.google_compute_network.default.id
}
resource "google_netapp_storage_pool" "default2" {
name = "tf-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "EXTREME"
capacity_gib = "2048"
network = data.google_compute_network.default.id
}
resource "google_netapp_volume" "test_volume" {
location = "us-west2"
location = "us-west4"
name = "tf-test-test-volume%{random_suffix}"
capacity_gib = "100"
share_name = "tf-test-test-volume%{random_suffix}"
Expand Down Expand Up @@ -224,21 +224,21 @@ func testAccNetappVolume_volumeBasicExample_update(context map[string]interface{
return acctest.Nprintf(`
resource "google_netapp_storage_pool" "default" {
name = "tf-test-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "PREMIUM"
capacity_gib = "2048"
network = data.google_compute_network.default.id
}
resource "google_netapp_storage_pool" "default2" {
name = "tf-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "EXTREME"
capacity_gib = "2048"
network = data.google_compute_network.default.id
}
resource "google_netapp_volume" "test_volume" {
location = "us-west2"
location = "us-west4"
name = "tf-test-test-volume%{random_suffix}"
capacity_gib = "200"
share_name = "tf-test-test-volume%{random_suffix}"
Expand Down Expand Up @@ -305,14 +305,14 @@ func testAccNetappVolume_volumeBasicExample_updatesnapshot(context map[string]in
return acctest.Nprintf(`
resource "google_netapp_storage_pool" "default2" {
name = "tf-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "EXTREME"
capacity_gib = "2048"
network = data.google_compute_network.default.id
}
resource "google_netapp_volume" "test_volume" {
location = "us-west2"
location = "us-west4"
name = "tf-test-test-volume%{random_suffix}"
capacity_gib = "200"
share_name = "tf-test-test-volume%{random_suffix}"
Expand Down Expand Up @@ -364,14 +364,14 @@ func testAccNetappVolume_volumeBasicExample_createclonevolume(context map[string
return acctest.Nprintf(`
resource "google_netapp_storage_pool" "default2" {
name = "tf-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "EXTREME"
capacity_gib = "2048"
network = data.google_compute_network.default.id
}
resource "google_netapp_volume" "test_volume" {
location = "us-west2"
location = "us-west4"
name = "tf-test-test-volume%{random_suffix}"
capacity_gib = "200"
share_name = "tf-test-test-volume%{random_suffix}"
Expand Down Expand Up @@ -413,7 +413,7 @@ resource "google_netapp_volume_snapshot" "test-snapshot" {
}
resource "google_netapp_volume" "test_volume_clone" {
location = "us-west2"
location = "us-west4"
name = "tf-test-test-volume-clone%{random_suffix}"
capacity_gib = "200"
share_name = "tf-test-test-volume-clone%{random_suffix}"
Expand All @@ -436,14 +436,14 @@ func testAccNetappVolume_volumeBasicExample_createBackupConfig(context map[strin
return acctest.Nprintf(`
resource "google_netapp_storage_pool" "default2" {
name = "tf-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "EXTREME"
capacity_gib = "2048"
network = data.google_compute_network.default.id
}
resource "google_netapp_volume" "test_volume" {
location = "us-west2"
location = "us-west4"
name = "tf-test-test-volume%{random_suffix}"
capacity_gib = "200"
share_name = "tf-test-test-volume%{random_suffix}"
Expand All @@ -469,13 +469,13 @@ resource "time_sleep" "wait_30_minutes" {
}
resource "google_netapp_backup_vault" "backup-vault" {
location = "us-west2"
location = "us-west4"
name = "tf-test-vault%{random_suffix}"
}
resource "google_netapp_backup_policy" "backup-policy" {
name = "tf-test-backup-policy%{random_suffix}"
location = "us-west2"
location = "us-west4"
daily_backup_limit = 2
weekly_backup_limit = 0
monthly_backup_limit = 0
Expand All @@ -493,14 +493,14 @@ func testAccNetappVolume_volumeBasicExample_updateBackupConfigRemoveBackupPolicy
return acctest.Nprintf(`
resource "google_netapp_storage_pool" "default2" {
name = "tf-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "EXTREME"
capacity_gib = "2048"
network = data.google_compute_network.default.id
}
resource "google_netapp_volume" "test_volume" {
location = "us-west2"
location = "us-west4"
name = "tf-test-test-volume%{random_suffix}"
capacity_gib = "200"
share_name = "tf-test-test-volume%{random_suffix}"
Expand All @@ -522,13 +522,13 @@ resource "time_sleep" "wait_30_minutes" {
}
resource "google_netapp_backup_vault" "backup-vault" {
location = "us-west2"
location = "us-west4"
name = "tf-test-vault%{random_suffix}"
}
resource "google_netapp_backup_policy" "backup-policy" {
name = "tf-test-backup-policy%{random_suffix}"
location = "us-west2"
location = "us-west4"
daily_backup_limit = 2
weekly_backup_limit = 0
monthly_backup_limit = 0
Expand All @@ -546,14 +546,14 @@ func testAccNetappVolume_volumeBasicExample_updateBackupConfigRemoveBackupVault(
return acctest.Nprintf(`
resource "google_netapp_storage_pool" "default2" {
name = "tf-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "EXTREME"
capacity_gib = "2048"
network = data.google_compute_network.default.id
}
resource "google_netapp_volume" "test_volume" {
location = "us-west2"
location = "us-west4"
name = "tf-test-test-volume%{random_suffix}"
capacity_gib = "200"
share_name = "tf-test-test-volume%{random_suffix}"
Expand All @@ -572,13 +572,13 @@ resource "time_sleep" "wait_30_minutes" {
}
resource "google_netapp_backup_vault" "backup-vault" {
location = "us-west2"
location = "us-west4"
name = "tf-test-vault%{random_suffix}"
}
resource "google_netapp_backup_policy" "backup-policy" {
name = "tf-test-backup-policy%{random_suffix}"
location = "us-west2"
location = "us-west4"
daily_backup_limit = 2
weekly_backup_limit = 0
monthly_backup_limit = 0
Expand Down Expand Up @@ -699,14 +699,14 @@ func testAccNetappVolume_autoTieredVolume_default(context map[string]interface{}
return acctest.Nprintf(`
resource "google_netapp_storage_pool" "default" {
name = "tf-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "PREMIUM"
capacity_gib = "2048"
network = data.google_compute_network.default.id
allow_auto_tiering = true
}
resource "google_netapp_volume" "test_volume" {
location = "us-west2"
location = "us-west4"
name = "tf-test-volume%{random_suffix}"
capacity_gib = "100"
share_name = "tf-test-volume%{random_suffix}"
Expand All @@ -727,15 +727,15 @@ func testAccNetappVolume_autoTieredVolume_custom(context map[string]interface{})
return acctest.Nprintf(`
resource "google_netapp_storage_pool" "default" {
name = "tf-test-pool%{random_suffix}"
location = "us-west2"
location = "us-west4"
service_level = "PREMIUM"
capacity_gib = "2048"
network = data.google_compute_network.default.id
allow_auto_tiering = true
}
resource "google_netapp_volume" "test_volume" {
location = "us-west2"
location = "us-west4"
name = "tf-test-volume%{random_suffix}"
capacity_gib = "100"
share_name = "tf-test-volume%{random_suffix}"
Expand Down

0 comments on commit 6ff722b

Please sign in to comment.