@@ -217,7 +217,7 @@ func TestLoadBalancerBackendSetResourceOciCerts_basic(t *testing.T) {
217217 "drain" : "true" ,
218218 "ip_address" : "10.0.0.3" ,
219219 "name" : "10.0.0.3:10" ,
220- "max_connections" : "400 " ,
220+ "max_connections" : "450 " ,
221221 "offline" : "true" ,
222222 "port" : "10" ,
223223 "weight" : "11" ,
@@ -273,7 +273,7 @@ func TestLoadBalancerBackendSetResourceOciCerts_basic(t *testing.T) {
273273 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.offline" , "true" ),
274274 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.port" , "10" ),
275275 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.weight" , "11" ),
276- resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.max_connections" , "0 " ),
276+ resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.max_connections" , "450 " ),
277277 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.health_checker.#" , "1" ),
278278 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.health_checker.0.interval_ms" , "2000" ),
279279 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.health_checker.0.port" , "11" ),
@@ -308,7 +308,8 @@ func TestLoadBalancerBackendSetResourceOciCerts_basic(t *testing.T) {
308308 // verify update with LB session persistence
309309 {
310310 Config : config + compartmentIdVariableStr + BackendSetResourceDependencies +
311- acctest .GenerateResourceFromRepresentationMap ("oci_load_balancer_backend_set" , "test_backend_set" , acctest .Optional , acctest .Create , backendSetLBRepresentationOciCerts ), // +
311+ acctest .GenerateResourceFromRepresentationMap ("oci_load_balancer_backend_set" , "test_backend_set" , acctest .Optional , acctest .Create , backendSetLBRepresentationOciCerts ) +
312+ acctest .GenerateResourceFromRepresentationMap ("oci_load_balancer_backend" , "test_backend" , acctest .Optional , acctest .Update , backendRepresentation ),
312313 Check : resource .ComposeAggregateTestCheckFunc (
313314 resource .TestCheckResourceAttr (resourceName , "health_checker.#" , "1" ),
314315 resource .TestCheckResourceAttr (resourceName , "health_checker.0.interval_ms" , "1000" ),
@@ -407,7 +408,7 @@ func TestLoadBalancerBackendSetResourceOciCerts_basic(t *testing.T) {
407408 "drain" : "true" ,
408409 "ip_address" : "10.0.0.3" ,
409410 "name" : "10.0.0.3:10" ,
410- "max_connections" : "400 " ,
411+ "max_connections" : "450 " ,
411412 "offline" : "true" ,
412413 "port" : "10" ,
413414 "weight" : "11" ,
@@ -467,7 +468,7 @@ func TestLoadBalancerBackendSetResourceOciCerts_basic(t *testing.T) {
467468 "drain" : "true" ,
468469 "ip_address" : "10.0.0.3" ,
469470 "name" : "10.0.0.3:10" ,
470- "max_connections" : "0 " ,
471+ "max_connections" : "450 " ,
471472 "offline" : "true" ,
472473 "port" : "10" ,
473474 "weight" : "11" ,
@@ -600,7 +601,7 @@ func TestLoadBalancerBackendSetResourceLB_basic(t *testing.T) {
600601 "ip_address" : "10.0.0.3" ,
601602 "name" : "10.0.0.3:10" ,
602603 "offline" : "true" ,
603- "max_connections" : "400 " ,
604+ "max_connections" : "450 " ,
604605 "port" : "10" ,
605606 "weight" : "11" ,
606607 },
@@ -652,7 +653,7 @@ func TestLoadBalancerBackendSetResourceLB_basic(t *testing.T) {
652653 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.backup" , "true" ),
653654 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.drain" , "true" ),
654655 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.ip_address" , "10.0.0.3" ),
655- resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.max_connections" , "0 " ),
656+ resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.max_connections" , "450 " ),
656657 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.offline" , "true" ),
657658 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.port" , "10" ),
658659 resource .TestCheckResourceAttr (datasourceName , "backendsets.0.backend.0.weight" , "11" ),
@@ -690,7 +691,8 @@ func TestLoadBalancerBackendSetResourceLB_basic(t *testing.T) {
690691 // verify Update with LB session persistence
691692 {
692693 Config : config + compartmentIdVariableStr + BackendSetResourceDependencies +
693- acctest .GenerateResourceFromRepresentationMap ("oci_load_balancer_backend_set" , "test_backend_set" , acctest .Optional , acctest .Create , backendSetLBRepresentation ), // +
694+ acctest .GenerateResourceFromRepresentationMap ("oci_load_balancer_backend_set" , "test_backend_set" , acctest .Optional , acctest .Create , backendSetLBRepresentation ) +
695+ acctest .GenerateResourceFromRepresentationMap ("oci_load_balancer_backend" , "test_backend" , acctest .Optional , acctest .Update , backendRepresentation ),
694696 Check : acctest .ComposeAggregateTestCheckFuncWrapper (
695697 resource .TestCheckResourceAttr (resourceName , "health_checker.#" , "1" ),
696698 resource .TestCheckResourceAttr (resourceName , "health_checker.0.interval_ms" , "1000" ),
@@ -792,7 +794,7 @@ func TestLoadBalancerBackendSetResourceLB_basic(t *testing.T) {
792794 "drain" : "true" ,
793795 "ip_address" : "10.0.0.3" ,
794796 "name" : "10.0.0.3:10" ,
795- "max_connections" : "400 " ,
797+ "max_connections" : "450 " ,
796798 "offline" : "true" ,
797799 "port" : "10" ,
798800 "weight" : "11" ,
@@ -854,7 +856,7 @@ func TestLoadBalancerBackendSetResourceLB_basic(t *testing.T) {
854856 "drain" : "true" ,
855857 "ip_address" : "10.0.0.3" ,
856858 "name" : "10.0.0.3:10" ,
857- "max_connections" : "0 " ,
859+ "max_connections" : "450 " ,
858860 "offline" : "true" ,
859861 "port" : "10" ,
860862 "weight" : "11" ,
@@ -984,7 +986,7 @@ func TestLoadBalancerBackendSetResourceLBCertToOciCerts_combo(t *testing.T) {
984986 "drain" : "true" ,
985987 "ip_address" : "10.0.0.3" ,
986988 "name" : "10.0.0.3:10" ,
987- "max_connections" : "400 " ,
989+ "max_connections" : "450 " ,
988990 "offline" : "true" ,
989991 "port" : "10" ,
990992 "weight" : "11" ,
@@ -1028,6 +1030,10 @@ func TestLoadBalancerBackendSetResourceOciCertsToLBCert_combo(t *testing.T) {
10281030 httpreplay .SetScenario ("TestLoadBalancerBackendSetResource_basic" )
10291031 defer httpreplay .SaveScenario ()
10301032
1033+ // provider added to avoid load_balancer_backend_set_test.go:1046: Test validation error:
1034+ // TestStep 1/2 validation error: Providers must be specified at the TestCase level or in all TestStep
1035+ //--- FAIL: TestLoadBalancerBackendSetResourceOciCertsToLBCert_combo (0.00s)
1036+ provider := acctest .TestAccProvider
10311037 config := acctest .ProviderTestConfig ()
10321038
10331039 compartmentId := utils .GetEnvSettingWithBlankDefault ("compartment_ocid" )
@@ -1042,7 +1048,10 @@ func TestLoadBalancerBackendSetResourceOciCertsToLBCert_combo(t *testing.T) {
10421048 acctest .GenerateResourceFromRepresentationMap ("oci_load_balancer_backend_set" , "test_backend_set" , acctest .Optional , acctest .Create , backendSetRepresentationOciCerts ), "loadbalancer" , "backendSet" , t )
10431049
10441050 resource .Test (t , resource.TestCase {
1045- PreCheck : func () { acctest .PreCheck (t ) },
1051+ PreCheck : func () { acctest .PreCheck (t ) },
1052+ Providers : map [string ]* schema.Provider { // added to avoid Providers must be specified at the TestCase level or in all TestStep
1053+ "oci" : provider ,
1054+ },
10461055 CheckDestroy : testAccCheckLoadBalancerBackendSetDestroy ,
10471056 Steps : []resource.TestStep {
10481057 // verify create with optionals
@@ -1089,7 +1098,7 @@ func TestLoadBalancerBackendSetResourceOciCertsToLBCert_combo(t *testing.T) {
10891098 "drain" : "true" ,
10901099 "ip_address" : "10.0.0.3" ,
10911100 "name" : "10.0.0.3:10" ,
1092- "max_connections" : "400 " ,
1101+ "max_connections" : "450 " ,
10931102 "offline" : "true" ,
10941103 "port" : "10" ,
10951104 "weight" : "11" ,
0 commit comments