Skip to content

Commit 4a3c7ba

Browse files
gurusai-voletiRooBarsic
authored andcommitted
fix: (storage) fix multi location rpo test case (GoogleCloudPlatform#13119)
1 parent 9b281c4 commit 4a3c7ba

File tree

1 file changed

+2
-51
lines changed

1 file changed

+2
-51
lines changed

mmv1/third_party/terraform/services/storage/resource_storage_bucket_test.go.tmpl

+2-51
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ func TestAccStorageBucket_basic(t *testing.T) {
3838
"google_storage_bucket.bucket", "project", envvar.GetTestProjectFromEnv()),
3939
resource.TestCheckResourceAttrSet(
4040
"google_storage_bucket.bucket", "project_number"),
41+
resource.TestCheckResourceAttr(
42+
"google_storage_bucket.bucket", "rpo", "DEFAULT"),
4143
),
4244
},
4345
{
@@ -376,46 +378,6 @@ func TestAccStorageBucket_dualLocation_rpo(t *testing.T) {
376378
})
377379
}
378380

379-
func TestAccStorageBucket_multiLocation_rpo(t *testing.T) {
380-
t.Parallel()
381-
382-
bucketName := acctest.TestBucketName(t)
383-
384-
acctest.VcrTest(t, resource.TestCase{
385-
PreCheck: func() { acctest.AccTestPreCheck(t) },
386-
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
387-
CheckDestroy: testAccStorageBucketDestroyProducer(t),
388-
Steps: []resource.TestStep{
389-
{
390-
Config: testAccStorageBucket_basic(bucketName),
391-
Check: resource.ComposeTestCheckFunc(
392-
resource.TestCheckResourceAttr(
393-
"google_storage_bucket.bucket", "rpo", "DEFAULT"),
394-
),
395-
},
396-
{
397-
ResourceName: "google_storage_bucket.bucket",
398-
ImportState: true,
399-
ImportStateVerify: true,
400-
ImportStateVerifyIgnore: []string{"force_destroy"},
401-
},
402-
{
403-
Config: testAccStorageBucket_multiLocation_rpo(bucketName,"DEFAULT"),
404-
Check: resource.ComposeTestCheckFunc(
405-
resource.TestCheckResourceAttr(
406-
"google_storage_bucket.bucket", "rpo", "DEFAULT"),
407-
),
408-
},
409-
{
410-
ResourceName: "google_storage_bucket.bucket",
411-
ImportState: true,
412-
ImportStateVerify: true,
413-
ImportStateVerifyIgnore: []string{"force_destroy"},
414-
},
415-
},
416-
})
417-
}
418-
419381
func TestAccStorageBucket_customAttributes(t *testing.T) {
420382
t.Parallel()
421383

@@ -1942,17 +1904,6 @@ resource "google_storage_bucket" "bucket" {
19421904
`, bucketName,rpo)
19431905
}
19441906

1945-
func testAccStorageBucket_multiLocation_rpo(bucketName string,rpo string) string {
1946-
return fmt.Sprintf(`
1947-
resource "google_storage_bucket" "bucket" {
1948-
name = "%s"
1949-
location = "ASIA"
1950-
force_destroy = true
1951-
rpo = "%s"
1952-
}
1953-
`, bucketName,rpo)
1954-
}
1955-
19561907
func testAccStorageBucket_customAttributes(bucketName string) string {
19571908
return fmt.Sprintf(`
19581909
resource "google_storage_bucket" "bucket" {

0 commit comments

Comments
 (0)