Skip to content

Commit ce335a0

Browse files
Add delay b/w storage pool creation & volume creation in backup test (#14312) (#23413)
[upstream:9fd1616aa0c4961cf9751dd420b94a3e2bac2907] Signed-off-by: Modular Magician <[email protected]>
1 parent 3435b9f commit ce335a0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

google/services/netapp/resource_netapp_backup_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ func TestAccNetappBackup_NetappBackupFull_update(t *testing.T) {
3636
PreCheck: func() { acctest.AccTestPreCheck(t) },
3737
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
3838
CheckDestroy: testAccCheckNetappBackupDestroyProducer(t),
39+
ExternalProviders: map[string]resource.ExternalProvider{
40+
"time": {},
41+
},
3942
Steps: []resource.TestStep{
4043
{
4144
Config: testAccNetappBackup_NetappBackupFromVolumeSnapshot(context),
@@ -73,6 +76,11 @@ resource "google_netapp_storage_pool" "default" {
7376
network = data.google_compute_network.default.id
7477
}
7578
79+
resource "time_sleep" "wait_3_minutes" {
80+
depends_on = [google_netapp_storage_pool.default]
81+
create_duration = "3m"
82+
}
83+
7684
resource "google_netapp_volume" "default" {
7785
name = "tf-test-backup-volume%{random_suffix}"
7886
location = google_netapp_storage_pool.default.location
@@ -132,6 +140,11 @@ resource "google_netapp_storage_pool" "default" {
132140
network = data.google_compute_network.default.id
133141
}
134142
143+
resource "time_sleep" "wait_3_minutes" {
144+
depends_on = [google_netapp_storage_pool.default]
145+
create_duration = "3m"
146+
}
147+
135148
resource "google_netapp_volume" "default" {
136149
name = "tf-test-backup-volume%{random_suffix}"
137150
location = google_netapp_storage_pool.default.location

0 commit comments

Comments
 (0)