Skip to content

Commit 7366137

Browse files
Make tests use sweepable, unique name (#12480) (#8836)
[upstream:27fe5d39002e2c29214cd0fdb738caf459fba207] Signed-off-by: Modular Magician <[email protected]>
1 parent 77788b3 commit 7366137

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

Diff for: .changelog/12480.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

Diff for: google-beta/services/oracledatabase/resource_oracle_database_cloud_vm_cluster_generated_test.go

+14-18
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ func TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterBasicExampl
3434
t.Parallel()
3535

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

4442
acctest.VcrTest(t, resource.TestCase{
@@ -62,8 +60,8 @@ func TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterBasicExampl
6260
func testAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterBasicExample(context map[string]interface{}) string {
6361
return acctest.Nprintf(`
6462
resource "google_oracle_database_cloud_vm_cluster" "my_vmcluster"{
65-
cloud_vm_cluster_id = "%{cloud_vm_cluster_id}"
66-
display_name = "%{cloud_vm_cluster_id} displayname"
63+
cloud_vm_cluster_id = "tf-test-my-instance%{random_suffix}"
64+
display_name = "tf-test-my-instance%{random_suffix} displayname"
6765
location = "us-east4"
6866
project = "%{project}"
6967
exadata_infrastructure = google_oracle_database_cloud_exadata_infrastructure.cloudExadataInfrastructures.id
@@ -82,8 +80,8 @@ resource "google_oracle_database_cloud_vm_cluster" "my_vmcluster"{
8280
}
8381
8482
resource "google_oracle_database_cloud_exadata_infrastructure" "cloudExadataInfrastructures"{
85-
cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}"
86-
display_name = "%{cloud_exadata_infrastructure_id} displayname"
83+
cloud_exadata_infrastructure_id = "tf-test-my-exadata%{random_suffix}"
84+
display_name = "tf-test-my-exadata%{random_suffix} displayname"
8785
location = "us-east4"
8886
project = "%{project}"
8987
properties {
@@ -106,11 +104,9 @@ func TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterFullExample
106104
t.Parallel()
107105

108106
context := map[string]interface{}{
109-
"cloud_exadata_infrastructure_id": "ofake-exadata-for-vm-full",
110-
"cloud_vm_cluster_id": "ofake-vmcluster-full",
111-
"deletion_protection": false,
112-
"project": "oci-terraform-testing",
113-
"random_suffix": acctest.RandString(t, 10),
107+
"deletion_protection": false,
108+
"project": "oci-terraform-testing",
109+
"random_suffix": acctest.RandString(t, 10),
114110
}
115111

116112
acctest.VcrTest(t, resource.TestCase{
@@ -134,8 +130,8 @@ func TestAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterFullExample
134130
func testAccOracleDatabaseCloudVmCluster_oracledatabaseCloudVmclusterFullExample(context map[string]interface{}) string {
135131
return acctest.Nprintf(`
136132
resource "google_oracle_database_cloud_vm_cluster" "my_vmcluster"{
137-
cloud_vm_cluster_id = "%{cloud_vm_cluster_id}"
138-
display_name = "%{cloud_vm_cluster_id} displayname"
133+
cloud_vm_cluster_id = "tf-test-my-instance%{random_suffix}"
134+
display_name = "tf-test-my-instance%{random_suffix} displayname"
139135
location = "us-east4"
140136
project = "%{project}"
141137
exadata_infrastructure = google_oracle_database_cloud_exadata_infrastructure.cloudExadataInfrastructures.id
@@ -175,8 +171,8 @@ resource "google_oracle_database_cloud_vm_cluster" "my_vmcluster"{
175171
}
176172
177173
resource "google_oracle_database_cloud_exadata_infrastructure" "cloudExadataInfrastructures"{
178-
cloud_exadata_infrastructure_id = "%{cloud_exadata_infrastructure_id}"
179-
display_name = "%{cloud_exadata_infrastructure_id} displayname"
174+
cloud_exadata_infrastructure_id = "tf-test-my-exadata%{random_suffix}"
175+
display_name = "tf-test-my-exadata%{random_suffix} displayname"
180176
location = "us-east4"
181177
project = "%{project}"
182178
properties {

0 commit comments

Comments
 (0)