Skip to content

Commit b94eb22

Browse files
Make google_oracle_database_autonomous_database and google_oracle_database_cloud_exadata_infrastructure generated tests use sweepable unique resource names (#12476) (#8833)
[upstream:c307c762769c34227812e5090f7ed0c6a2dedc4e] Signed-off-by: Modular Magician <[email protected]>
1 parent 1479629 commit b94eb22

File tree

3 files changed

+21
-22
lines changed

3 files changed

+21
-22
lines changed

.changelog/12476.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/services/oracledatabase/resource_oracle_database_autonomous_database_generated_test.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ func TestAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseBas
3434
t.Parallel()
3535

3636
context := map[string]interface{}{
37-
"autonomous_database_id": "my-adb-instance-id",
38-
"deletion_protection": false,
39-
"project": "oci-terraform-testing",
40-
"random_suffix": acctest.RandString(t, 10),
37+
"deletion_protection": false,
38+
"project": "oci-terraform-testing",
39+
"random_suffix": acctest.RandString(t, 10),
4140
}
4241

4342
acctest.VcrTest(t, resource.TestCase{
@@ -61,7 +60,7 @@ func TestAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseBas
6160
func testAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseBasicExample(context map[string]interface{}) string {
6261
return acctest.Nprintf(`
6362
resource "google_oracle_database_autonomous_database" "myADB"{
64-
autonomous_database_id = "%{autonomous_database_id}"
63+
autonomous_database_id = "tf-test-my-instance%{random_suffix}"
6564
location = "us-east4"
6665
project = "%{project}"
6766
database = "testdb"
@@ -89,10 +88,9 @@ func TestAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseFul
8988
t.Parallel()
9089

9190
context := map[string]interface{}{
92-
"autonomous_database_id": "my-adb-instance-id-2",
93-
"deletion_protection": false,
94-
"project": "oci-terraform-testing",
95-
"random_suffix": acctest.RandString(t, 10),
91+
"deletion_protection": false,
92+
"project": "oci-terraform-testing",
93+
"random_suffix": acctest.RandString(t, 10),
9694
}
9795

9896
acctest.VcrTest(t, resource.TestCase{
@@ -116,7 +114,7 @@ func TestAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseFul
116114
func testAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseFullExample(context map[string]interface{}) string {
117115
return acctest.Nprintf(`
118116
resource "google_oracle_database_autonomous_database" "myADB"{
119-
autonomous_database_id = "%{autonomous_database_id}"
117+
autonomous_database_id = "tf-test-my-instance%{random_suffix}"
120118
location = "us-east4"
121119
project = "%{project}"
122120
display_name = "autonomousDatabase displayname"

google-beta/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_test.go

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ func TestAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataI
3434
t.Parallel()
3535

3636
context := map[string]interface{}{
37-
"cloud_exadata_infrastructure_id": "ofake-exadata-basic",
38-
"deletion_protection": false,
39-
"project": "oci-terraform-testing",
40-
"random_suffix": acctest.RandString(t, 10),
37+
"deletion_protection": false,
38+
"project": "oci-terraform-testing",
39+
"random_suffix": acctest.RandString(t, 10),
4140
}
4241

4342
acctest.VcrTest(t, resource.TestCase{
@@ -61,8 +60,8 @@ func TestAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataI
6160
func testAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataInfrastructureBasicExample(context map[string]interface{}) string {
6261
return acctest.Nprintf(`
6362
resource "google_oracle_database_cloud_exadata_infrastructure" "my-cloud-exadata"{
64-
cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}"
65-
display_name = "%{cloud_exadata_infrastructure_id} displayname"
63+
cloud_exadata_infrastructure_id = "tf-test-my-instance%{random_suffix}"
64+
display_name = "tf-test-my-instance%{random_suffix} displayname"
6665
location = "us-east4"
6766
project = "%{project}"
6867
properties {
@@ -80,10 +79,9 @@ func TestAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataI
8079
t.Parallel()
8180

8281
context := map[string]interface{}{
83-
"cloud_exadata_infrastructure_id": "ofake-exadata-full",
84-
"deletion_protection": false,
85-
"project": "oci-terraform-testing",
86-
"random_suffix": acctest.RandString(t, 10),
82+
"deletion_protection": false,
83+
"project": "oci-terraform-testing",
84+
"random_suffix": acctest.RandString(t, 10),
8785
}
8886

8987
acctest.VcrTest(t, resource.TestCase{
@@ -107,8 +105,8 @@ func TestAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataI
107105
func testAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataInfrastructureFullExample(context map[string]interface{}) string {
108106
return acctest.Nprintf(`
109107
resource "google_oracle_database_cloud_exadata_infrastructure" "my-cloud-exadata"{
110-
cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}"
111-
display_name = "%{cloud_exadata_infrastructure_id} displayname"
108+
cloud_exadata_infrastructure_id = "tf-test-my-instance%{random_suffix}"
109+
display_name = "tf-test-my-instance%{random_suffix} displayname"
112110
location = "us-east4"
113111
project = "%{project}"
114112
gcp_oracle_zone = "us-east4-b-r1"

0 commit comments

Comments
 (0)