From 5ad8ce670f35487698cd7f6ba7e8a3aaf9504edc Mon Sep 17 00:00:00 2001 From: The Magician Date: Thu, 5 Dec 2024 08:47:38 -0800 Subject: [PATCH] Update oracledatabase acceptance tests to use unique names with ofake- prefix (#12497) (#8851) [upstream:b8fc96e619a677023191bb1ac2b867ce9a7b06d0] Signed-off-by: Modular Magician --- .changelog/12497.txt | 3 ++ ...d_exadata_infrastructure_generated_test.go | 22 +++++++------ ...atabase_cloud_vm_cluster_generated_test.go | 32 +++++++++++-------- 3 files changed, 33 insertions(+), 24 deletions(-) create mode 100644 .changelog/12497.txt diff --git a/.changelog/12497.txt b/.changelog/12497.txt new file mode 100644 index 0000000000..42b910df15 --- /dev/null +++ b/.changelog/12497.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` \ No newline at end of file diff --git a/google-beta/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_test.go b/google-beta/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_test.go index ecdc12f5ac..82bc3f6f8f 100644 --- a/google-beta/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_test.go +++ b/google-beta/services/oracledatabase/resource_oracle_database_cloud_exadata_infrastructure_generated_test.go @@ -34,9 +34,10 @@ func TestAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataI t.Parallel() context := map[string]interface{}{ - "deletion_protection": false, - "project": "oci-terraform-testing", - "random_suffix": acctest.RandString(t, 10), + "cloud_exadata_infrastructure_id": fmt.Sprintf("ofake-tf-test-exadata-basic-%s", acctest.RandString(t, 10)), + "deletion_protection": false, + "project": "oci-terraform-testing", + "random_suffix": acctest.RandString(t, 10), } acctest.VcrTest(t, resource.TestCase{ @@ -60,8 +61,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 = "tf-test-my-instance%{random_suffix}" - display_name = "tf-test-my-instance%{random_suffix} displayname" + cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}" + display_name = "%{cloud_exadata_infrastructure_id} displayname" location = "us-east4" project = "%{project}" properties { @@ -79,9 +80,10 @@ func TestAccOracleDatabaseCloudExadataInfrastructure_oracledatabaseCloudExadataI t.Parallel() context := map[string]interface{}{ - "deletion_protection": false, - "project": "oci-terraform-testing", - "random_suffix": acctest.RandString(t, 10), + "cloud_exadata_infrastructure_id": fmt.Sprintf("ofake-tf-test-exadata-full-%s", acctest.RandString(t, 10)), + "deletion_protection": false, + "project": "oci-terraform-testing", + "random_suffix": acctest.RandString(t, 10), } acctest.VcrTest(t, resource.TestCase{ @@ -105,8 +107,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 = "tf-test-my-instance%{random_suffix}" - display_name = "tf-test-my-instance%{random_suffix} displayname" + cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}" + display_name = "%{cloud_exadata_infrastructure_id} displayname" location = "us-east4" project = "%{project}" gcp_oracle_zone = "us-east4-b-r1" diff --git a/google-beta/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_test.go b/google-beta/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_test.go index f519dd1b9e..b31d8e9e5a 100644 --- a/google-beta/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_test.go +++ b/google-beta/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_test.go @@ -34,9 +34,11 @@ func TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterBasicExampl t.Parallel() context := map[string]interface{}{ - "deletion_protection": false, - "project": "oci-terraform-testing", - "random_suffix": acctest.RandString(t, 10), + "cloud_exadata_infrastructure_id": fmt.Sprintf("ofake-tf-test-exadata-for-vmcluster-basic-%s", acctest.RandString(t, 10)), + "cloud_vm_cluster_id": fmt.Sprintf("ofake-tf-test-vmcluster-basic-%s", acctest.RandString(t, 10)), + "deletion_protection": false, + "project": "oci-terraform-testing", + "random_suffix": acctest.RandString(t, 10), } acctest.VcrTest(t, resource.TestCase{ @@ -60,8 +62,8 @@ func TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterBasicExampl func testAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterBasicExample(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_oracle_database_cloud_vm_cluster" "my_vmcluster"{ - cloud_vm_cluster_id = "tf-test-my-instance%{random_suffix}" - display_name = "tf-test-my-instance%{random_suffix} displayname" + cloud_vm_cluster_id = "%{cloud_vm_cluster_id}" + display_name = "%{cloud_vm_cluster_id} displayname" location = "us-east4" project = "%{project}" exadata_infrastructure = google_oracle_database_cloud_exadata_infrastructure.cloudExadataInfrastructures.id @@ -80,8 +82,8 @@ resource "google_oracle_database_cloud_vm_cluster" "my_vmcluster"{ } resource "google_oracle_database_cloud_exadata_infrastructure" "cloudExadataInfrastructures"{ - cloud_exadata_infrastructure_id = "tf-test-my-exadata%{random_suffix}" - display_name = "tf-test-my-exadata%{random_suffix} displayname" + cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}" + display_name = "%{cloud_exadata_infrastructure_id} displayname" location = "us-east4" project = "%{project}" properties { @@ -104,9 +106,11 @@ func TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterFullExample t.Parallel() context := map[string]interface{}{ - "deletion_protection": false, - "project": "oci-terraform-testing", - "random_suffix": acctest.RandString(t, 10), + "cloud_exadata_infrastructure_id": fmt.Sprintf("ofake-tf-test-exadata-for-vmcluster-full-%s", acctest.RandString(t, 10)), + "cloud_vm_cluster_id": fmt.Sprintf("ofake-tf-test-vmcluster-full-%s", acctest.RandString(t, 10)), + "deletion_protection": false, + "project": "oci-terraform-testing", + "random_suffix": acctest.RandString(t, 10), } acctest.VcrTest(t, resource.TestCase{ @@ -130,8 +134,8 @@ func TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterFullExample func testAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterFullExample(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_oracle_database_cloud_vm_cluster" "my_vmcluster"{ - cloud_vm_cluster_id = "tf-test-my-instance%{random_suffix}" - display_name = "tf-test-my-instance%{random_suffix} displayname" + cloud_vm_cluster_id = "%{cloud_vm_cluster_id}" + display_name = "%{cloud_vm_cluster_id} displayname" location = "us-east4" project = "%{project}" exadata_infrastructure = google_oracle_database_cloud_exadata_infrastructure.cloudExadataInfrastructures.id @@ -171,8 +175,8 @@ resource "google_oracle_database_cloud_vm_cluster" "my_vmcluster"{ } resource "google_oracle_database_cloud_exadata_infrastructure" "cloudExadataInfrastructures"{ - cloud_exadata_infrastructure_id = "tf-test-my-exadata%{random_suffix}" - display_name = "tf-test-my-exadata%{random_suffix} displayname" + cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}" + display_name = "%{cloud_exadata_infrastructure_id} displayname" location = "us-east4" project = "%{project}" properties {