Skip to content

Commit 9e27b8d

Browse files
committed
test config fix for v12
1 parent 349a7bd commit 9e27b8d

File tree

3 files changed

+67
-28
lines changed

3 files changed

+67
-28
lines changed

oci/autoscaling_auto_scaling_configuration_scenario_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (s *ResourceAutoscalingConfigurationTestSuite) SetupTest() {
9292
nested_object = "{\"some_string\": \"stringB\", \"object\": {\"some_string\": \"stringC\"}}"
9393
}
9494
95-
source_details = {
95+
source_details {
9696
source_type = "image"
9797
image_id = "${var.InstanceImageOCID[var.region]}"
9898
}

oci/database_data_guard_association_resource_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ var (
9696
`
9797
)
9898

99-
func TestAccResourceDatabaseDataGuardAssociation_Exadata(t *testing.T) {
100-
httpreplay.SetScenario("TestAccResourceDatabaseDataGuardAssociation_Exadata")
99+
func TestResourceDatabaseDataGuardAssociation_Exadata(t *testing.T) {
100+
httpreplay.SetScenario("TestResourceDatabaseDataGuardAssociation_Exadata")
101101
defer httpreplay.SaveScenario()
102102

103103
if strings.Contains(getEnvSettingWithBlankDefault("suppressed_tests"), "DataGuardAssociation_Exadata") {
@@ -141,8 +141,8 @@ func TestAccResourceDatabaseDataGuardAssociation_Exadata(t *testing.T) {
141141
db_version = "12.1.0.2"
142142
display_name = "TFTestDbHome1"
143143
database {
144-
"admin_password" = "BEstrO0ng_#11"
145-
"db_name" = "aTFdb"
144+
admin_password = "BEstrO0ng_#11"
145+
db_name = "aTFdb"
146146
}
147147
}
148148
}
@@ -168,8 +168,8 @@ func TestAccResourceDatabaseDataGuardAssociation_Exadata(t *testing.T) {
168168
db_version = "12.1.0.2"
169169
display_name = "TFTestDbHome1"
170170
database {
171-
"admin_password" = "BEstrO0ng_#11"
172-
"db_name" = "aTFdb2"
171+
admin_password = "BEstrO0ng_#11"
172+
db_name = "aTFdb2"
173173
}
174174
}
175175
}

oci/filters_integration_test.go

Lines changed: 60 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"fmt"
77
"testing"
88

9+
"github.com/terraform-providers/terraform-provider-oci/httpreplay"
10+
911
"github.com/hashicorp/terraform/helper/resource"
1012
"github.com/hashicorp/terraform/terraform"
1113
)
@@ -45,6 +47,9 @@ resource "oci_core_instance" "test_instance" {
4547
)
4648

4749
func TestApplyFiltersIntegration_basic(t *testing.T) {
50+
httpreplay.SetScenario("TestApplyFiltersIntegration_basic")
51+
defer httpreplay.SaveScenario()
52+
4853
provider := testAccProvider
4954
config := testProviderConfig()
5055

@@ -59,27 +64,61 @@ func TestApplyFiltersIntegration_basic(t *testing.T) {
5964
// verify datasource id
6065
{
6166
Config: config + `
62-
variable "instance_create_vnic_details_defined_tags_value" { default = "definedTags" }
63-
variable "instance_create_vnic_details_display_name" { default = "displayName" }
64-
variable "instance_create_vnic_details_freeform_tags" { default = {"Department"= "Accounting"} }
65-
variable "instance_create_vnic_details_hostname_label" { default = "hostnameLabel" }
66-
variable "instance_defined_tags_value" { default = "updatedValue" }
67-
variable "instance_display_name" { default = "displayName2" }
68-
variable "instance_extended_metadata" { default = {
69-
keyA = "valA"
70-
keyB = "{\"keyB1\": \"valB1\", \"keyB2\": {\"keyB2\": \"valB2\"}}"
71-
} }
72-
variable "instance_freeform_tags" { default = {"Department"= "Accounting"} }
73-
variable "instance_hostname_label" { default = "hostnameLabel" }
74-
variable "instance_image" { default = "image" }
75-
variable "instance_ipxe_script" { default = "ipxeScript" }
76-
variable "instance_metadata" { default = {
77-
ssh_authorized_keys = "ssh-rsa KKKLK3NzaC1yc2EAAAADAQABAAABAQC+UC9MFNA55NIVtKPIBCNw7++ACXhD0hx+Zyj25JfHykjz/QU3Q5FAU3DxDbVXyubgXfb/GJnrKRY8O4QDdvnZZRvQFFEOaApThAmCAM5MuFUIHdFvlqP+0W+ZQnmtDhwVe2NCfcmOrMuaPEgOKO3DOW6I/qOOdO691Xe2S9NgT9HhN0ZfFtEODVgvYulgXuCCXsJs+NUqcHAOxxFUmwkbPvYi0P0e2DT8JKeiOOC8VKUEgvVx+GKmqasm+Y6zHFW7vv3g2GstE1aRs3mttHRoC/JPM86PRyIxeWXEMzyG5wHqUu4XZpDbnWNxi6ugxnAGiL3CrIFdCgRNgHz5qS1l MustWin"
78-
user_data = "SWYgeW91IGNhbiBzZWUgdGhpcywgdGhlbiBpdCB3b3JrZWQgbWF5YmUuCg=="}
79-
}
80-
variable "instance_shape" { default = "VM.Standard2.1" }
81-
variable "instance_source_details_source_type" { default = "sourceType" }
82-
variable "instance_state" { default = "AVAILABLE" }
67+
variable "instance_create_vnic_details_defined_tags_value" {
68+
default = "definedTags"
69+
}
70+
variable "instance_create_vnic_details_display_name" {
71+
default = "displayName"
72+
}
73+
variable "instance_create_vnic_details_freeform_tags" {
74+
default = {
75+
"Department"= "Accounting"
76+
}
77+
}
78+
variable "instance_create_vnic_details_hostname_label" {
79+
default = "hostnameLabel"
80+
}
81+
variable "instance_defined_tags_value" {
82+
default = "updatedValue"
83+
}
84+
variable "instance_display_name" {
85+
default = "displayName2"
86+
}
87+
variable "instance_extended_metadata" {
88+
default = {
89+
keyA = "valA"
90+
keyB = "{\"keyB1\": \"valB1\", \"keyB2\": {\"keyB2\": \"valB2\"}}"
91+
}
92+
}
93+
variable "instance_freeform_tags" {
94+
default = {
95+
"Department"= "Accounting"
96+
}
97+
}
98+
variable "instance_hostname_label" {
99+
default = "hostnameLabel"
100+
}
101+
variable "instance_image" {
102+
default = "image"
103+
}
104+
variable "instance_ipxe_script" {
105+
default = "ipxeScript"
106+
}
107+
variable "instance_metadata" {
108+
default = {
109+
ssh_authorized_keys = "ssh-rsa KKKLK3NzaC1yc2EAAAADAQABAAABAQC+UC9MFNA55NIVtKPIBCNw7++ACXhD0hx+Zyj25JfHykjz/QU3Q5FAU3DxDbVXyubgXfb/GJnrKRY8O4QDdvnZZRvQFFEOaApThAmCAM5MuFUIHdFvlqP+0W+ZQnmtDhwVe2NCfcmOrMuaPEgOKO3DOW6I/qOOdO691Xe2S9NgT9HhN0ZfFtEODVgvYulgXuCCXsJs+NUqcHAOxxFUmwkbPvYi0P0e2DT8JKeiOOC8VKUEgvVx+GKmqasm+Y6zHFW7vv3g2GstE1aRs3mttHRoC/JPM86PRyIxeWXEMzyG5wHqUu4XZpDbnWNxi6ugxnAGiL3CrIFdCgRNgHz5qS1l MustWin"
110+
user_data = "SWYgeW91IGNhbiBzZWUgdGhpcywgdGhlbiBpdCB3b3JrZWQgbWF5YmUuCg=="
111+
}
112+
}
113+
variable "instance_shape" {
114+
default = "VM.Standard2.1"
115+
}
116+
variable "instance_source_details_source_type" {
117+
default = "sourceType"
118+
}
119+
variable "instance_state" {
120+
default = "AVAILABLE"
121+
}
83122
84123
data "oci_core_instances" "test_instances" {
85124
#Required

0 commit comments

Comments
 (0)