Skip to content

Commit

Permalink
Make tests use sweepable, unique name (#12480) (#20578)
Browse files Browse the repository at this point in the history
[upstream:27fe5d39002e2c29214cd0fdb738caf459fba207]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Dec 3, 2024
1 parent 5fad944 commit a9e30d3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .changelog/12480.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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
Expand All @@ -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 {
Expand All @@ -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{
Expand All @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a9e30d3

Please sign in to comment.