From dad1fcaf76f0abc10cc533e4c1e3c04dbc613cff Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 3 Dec 2024 12:13:56 -0800 Subject: [PATCH] Make `google_oracle_database_autonomous_database` and `google_oracle_database_cloud_exadata_infrastructure` generated tests use sweepable unique resource names (#12476) (#20569) [upstream:c307c762769c34227812e5090f7ed0c6a2dedc4e] Signed-off-by: Modular Magician --- .changelog/12476.txt | 3 +++ ...base_autonomous_database_generated_test.go | 18 +++++++-------- ...d_exadata_infrastructure_generated_test.go | 22 +++++++++---------- 3 files changed, 21 insertions(+), 22 deletions(-) create mode 100644 .changelog/12476.txt diff --git a/.changelog/12476.txt b/.changelog/12476.txt new file mode 100644 index 00000000000..42b910df155 --- /dev/null +++ b/.changelog/12476.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` \ No newline at end of file diff --git a/google/services/oracledatabase/resource_oracle_database_autonomous_database_generated_test.go b/google/services/oracledatabase/resource_oracle_database_autonomous_database_generated_test.go index 1f711b36092..2384fcbdf2a 100644 --- a/google/services/oracledatabase/resource_oracle_database_autonomous_database_generated_test.go +++ b/google/services/oracledatabase/resource_oracle_database_autonomous_database_generated_test.go @@ -34,10 +34,9 @@ func TestAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseBas t.Parallel() context := map[string]interface{}{ - "autonomous_database_id": "my-adb-instance-id", - "deletion_protection": false, - "project": "oci-terraform-testing", - "random_suffix": acctest.RandString(t, 10), + "deletion_protection": false, + "project": "oci-terraform-testing", + "random_suffix": acctest.RandString(t, 10), } acctest.VcrTest(t, resource.TestCase{ @@ -61,7 +60,7 @@ func TestAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseBas func testAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseBasicExample(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_oracle_database_autonomous_database" "myADB"{ - autonomous_database_id = "%{autonomous_database_id}" + autonomous_database_id = "tf-test-my-instance%{random_suffix}" location = "us-east4" project = "%{project}" database = "testdb" @@ -89,10 +88,9 @@ func TestAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseFul t.Parallel() context := map[string]interface{}{ - "autonomous_database_id": "my-adb-instance-id-2", - "deletion_protection": false, - "project": "oci-terraform-testing", - "random_suffix": acctest.RandString(t, 10), + "deletion_protection": false, + "project": "oci-terraform-testing", + "random_suffix": acctest.RandString(t, 10), } acctest.VcrTest(t, resource.TestCase{ @@ -116,7 +114,7 @@ func TestAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseFul func testAccOracleDatabaseAutonomousDatabase_oracledatabaseAutonomousDatabaseFullExample(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_oracle_database_autonomous_database" "myADB"{ - autonomous_database_id = "%{autonomous_database_id}" + autonomous_database_id = "tf-test-my-instance%{random_suffix}" location = "us-east4" project = "%{project}" display_name = "autonomousDatabase displayname" diff --git a/google/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_test.go b/google/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_test.go index 1429e83e11e..01b3185b8b2 100644 --- a/google/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_test.go +++ b/google/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_test.go @@ -34,10 +34,9 @@ func TestAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataI t.Parallel() context := map[string]interface{}{ - "cloud_exadata_infrastructure_id": "ofake-exadata-basic", - "deletion_protection": false, - "project": "oci-terraform-testing", - "random_suffix": acctest.RandString(t, 10), + "deletion_protection": false, + "project": "oci-terraform-testing", + "random_suffix": acctest.RandString(t, 10), } acctest.VcrTest(t, resource.TestCase{ @@ -61,8 +60,8 @@ func TestAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataI func testAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataInfrastructureBasicExample(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_oracle_database_cloud_exadata_infrastructure" "my-cloud-exadata"{ - cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}" - display_name = "%{cloud_exadata_infrastructure_id} displayname" + cloud_exadata_infrastructure_id = "tf-test-my-instance%{random_suffix}" + display_name = "tf-test-my-instance%{random_suffix} displayname" location = "us-east4" project = "%{project}" properties { @@ -80,10 +79,9 @@ func TestAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataI t.Parallel() context := map[string]interface{}{ - "cloud_exadata_infrastructure_id": "ofake-exadata-full", - "deletion_protection": false, - "project": "oci-terraform-testing", - "random_suffix": acctest.RandString(t, 10), + "deletion_protection": false, + "project": "oci-terraform-testing", + "random_suffix": acctest.RandString(t, 10), } acctest.VcrTest(t, resource.TestCase{ @@ -107,8 +105,8 @@ func TestAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataI func testAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataInfrastructureFullExample(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_oracle_database_cloud_exadata_infrastructure" "my-cloud-exadata"{ - cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}" - display_name = "%{cloud_exadata_infrastructure_id} displayname" + cloud_exadata_infrastructure_id = "tf-test-my-instance%{random_suffix}" + display_name = "tf-test-my-instance%{random_suffix} displayname" location = "us-east4" project = "%{project}" gcp_oracle_zone = "us-east4-b-r1"