From a9e30d3a1d5eae80ddb52eb13f79f8c404990689 Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 3 Dec 2024 14:47:53 -0800 Subject: [PATCH] Make tests use sweepable, unique name (#12480) (#20578) [upstream:27fe5d39002e2c29214cd0fdb738caf459fba207] Signed-off-by: Modular Magician --- .changelog/12480.txt | 3 ++ ...atabase_cloud_vm_cluster_generated_test.go | 32 ++++++++----------- 2 files changed, 17 insertions(+), 18 deletions(-) create mode 100644 .changelog/12480.txt diff --git a/.changelog/12480.txt b/.changelog/12480.txt new file mode 100644 index 00000000000..23fddec5978 --- /dev/null +++ b/.changelog/12480.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` \ No newline at end of file diff --git a/google/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_test.go b/google/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_test.go index 2e57406eb44..85a7d5813b0 100644 --- a/google/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_test.go +++ b/google/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_test.go @@ -34,11 +34,9 @@ func TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterBasicExampl t.Parallel() context := map[string]interface{}{ - "cloud_exadata_infrastructure_id": "ofake-exadata-for-vm-basic", - "cloud_vm_cluster_id": "ofake-vmcluster-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{ @@ -62,8 +60,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 = "%{cloud_vm_cluster_id}" - display_name = "%{cloud_vm_cluster_id} displayname" + cloud_vm_cluster_id = "tf-test-my-instance%{random_suffix}" + display_name = "tf-test-my-instance%{random_suffix} displayname" location = "us-east4" project = "%{project}" exadata_infrastructure = google_oracle_database_cloud_exadata_infrastructure.cloudExadataInfrastructures.id @@ -82,8 +80,8 @@ resource "google_oracle_database_cloud_vm_cluster" "my_vmcluster"{ } resource "google_oracle_database_cloud_exadata_infrastructure" "cloudExadataInfrastructures"{ - cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}" - display_name = "%{cloud_exadata_infrastructure_id} displayname" + cloud_exadata_infrastructure_id = "tf-test-my-exadata%{random_suffix}" + display_name = "tf-test-my-exadata%{random_suffix} displayname" location = "us-east4" project = "%{project}" properties { @@ -106,11 +104,9 @@ func TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterFullExample t.Parallel() context := map[string]interface{}{ - "cloud_exadata_infrastructure_id": "ofake-exadata-for-vm-full", - "cloud_vm_cluster_id": "ofake-vmcluster-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{ @@ -134,8 +130,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 = "%{cloud_vm_cluster_id}" - display_name = "%{cloud_vm_cluster_id} displayname" + cloud_vm_cluster_id = "tf-test-my-instance%{random_suffix}" + display_name = "tf-test-my-instance%{random_suffix} displayname" location = "us-east4" project = "%{project}" exadata_infrastructure = google_oracle_database_cloud_exadata_infrastructure.cloudExadataInfrastructures.id @@ -175,8 +171,8 @@ resource "google_oracle_database_cloud_vm_cluster" "my_vmcluster"{ } resource "google_oracle_database_cloud_exadata_infrastructure" "cloudExadataInfrastructures"{ - cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}" - display_name = "%{cloud_exadata_infrastructure_id} displayname" + cloud_exadata_infrastructure_id = "tf-test-my-exadata%{random_suffix}" + display_name = "tf-test-my-exadata%{random_suffix} displayname" location = "us-east4" project = "%{project}" properties {