Skip to content

Commit ce422d1

Browse files
tpolichpatryk
authored andcommitted
Added ProbeZone to LoadBalancerMonitor to support new API field for loadbalancer monitors (cloudflare#285)
1 parent 45927df commit ce422d1

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

load_balancing.go

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ type LoadBalancerMonitor struct {
5151
ExpectedCodes string `json:"expected_codes"`
5252
FollowRedirects bool `json:"follow_redirects"`
5353
AllowInsecure bool `json:"allow_insecure"`
54+
ProbeZone string `json:"probe_zone"`
5455
}
5556

5657
// LoadBalancer represents a load balancer's properties.

load_balancing_test.go

+10-5
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ func TestCreateLoadBalancerMonitor(t *testing.T) {
406406
"expected_body": "alive",
407407
"expected_codes": "2xx",
408408
"follow_redirects": true,
409-
"allow_insecure": true
409+
"allow_insecure": true,
410+
"probe_zone": ""
410411
}`, string(b))
411412
}
412413
fmt.Fprint(w, `{
@@ -435,7 +436,8 @@ func TestCreateLoadBalancerMonitor(t *testing.T) {
435436
"expected_body": "alive",
436437
"expected_codes": "2xx",
437438
"follow_redirects": true,
438-
"allow_insecure": true
439+
"allow_insecure": true,
440+
"probe_zone": ""
439441
}
440442
}`)
441443
}
@@ -596,7 +598,8 @@ func TestLoadBalancerMonitorDetails(t *testing.T) {
596598
"expected_body": "alive",
597599
"expected_codes": "2xx",
598600
"follow_redirects": true,
599-
"allow_insecure": true
601+
"allow_insecure": true,
602+
"probe_zone": ""
600603
}
601604
}`)
602605
}
@@ -687,7 +690,8 @@ func TestModifyLoadBalancerMonitor(t *testing.T) {
687690
"expected_body": "kicking",
688691
"expected_codes": "200",
689692
"follow_redirects": true,
690-
"allow_insecure": true
693+
"allow_insecure": true,
694+
"probe_zone": ""
691695
}`, string(b))
692696
}
693697
fmt.Fprint(w, `{
@@ -716,7 +720,8 @@ func TestModifyLoadBalancerMonitor(t *testing.T) {
716720
"expected_body": "kicking",
717721
"expected_codes": "200",
718722
"follow_redirects": true,
719-
"allow_insecure": true
723+
"allow_insecure": true,
724+
"probe_zone": ""
720725
}
721726
}`)
722727
}

0 commit comments

Comments
 (0)