From 7bdb342f1790b6cc0a393aba46c3785360b562f6 Mon Sep 17 00:00:00 2001 From: Nikolai Mishin Date: Mon, 28 Aug 2023 00:08:43 +0200 Subject: [PATCH] Fix case --- load_balancing.go | 38 +++++++++---------- load_balancing_test.go | 84 +++++++++++++++++++++--------------------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/load_balancing.go b/load_balancing.go index be21835f6df..8acf121fdc7 100644 --- a/load_balancing.go +++ b/load_balancing.go @@ -64,25 +64,25 @@ type LoadBalancerOriginSteering struct { // LoadBalancerMonitor represents a load balancer monitor's properties. type LoadBalancerMonitor struct { - ID string `json:"id,omitempty"` - CreatedOn *time.Time `json:"created_on,omitempty"` - ModifiedOn *time.Time `json:"modified_on,omitempty"` - Type string `json:"type"` - Description string `json:"description"` - Method string `json:"method"` - Path string `json:"path"` - Header map[string][]string `json:"header"` - Timeout int `json:"timeout"` - Retries int `json:"retries"` - Interval int `json:"interval"` - Consecutive_up int `json:"consecutive_up"` - Consecutive_down int `json:"consecutive_down"` - Port uint16 `json:"port,omitempty"` - ExpectedBody string `json:"expected_body"` - ExpectedCodes string `json:"expected_codes"` - FollowRedirects bool `json:"follow_redirects"` - AllowInsecure bool `json:"allow_insecure"` - ProbeZone string `json:"probe_zone"` + ID string `json:"id,omitempty"` + CreatedOn *time.Time `json:"created_on,omitempty"` + ModifiedOn *time.Time `json:"modified_on,omitempty"` + Type string `json:"type"` + Description string `json:"description"` + Method string `json:"method"` + Path string `json:"path"` + Header map[string][]string `json:"header"` + Timeout int `json:"timeout"` + Retries int `json:"retries"` + Interval int `json:"interval"` + ConsecutiveUp int `json:"consecutive_up"` + ConsecutiveDown int `json:"consecutive_down"` + Port uint16 `json:"port,omitempty"` + ExpectedBody string `json:"expected_body"` + ExpectedCodes string `json:"expected_codes"` + FollowRedirects bool `json:"follow_redirects"` + AllowInsecure bool `json:"allow_insecure"` + ProbeZone string `json:"probe_zone"` } // LoadBalancer represents a load balancer's properties. diff --git a/load_balancing_test.go b/load_balancing_test.go index 926c87d9e09..2b3d3ae6cb6 100644 --- a/load_balancing_test.go +++ b/load_balancing_test.go @@ -681,13 +681,13 @@ func TestCreateLoadBalancerMonitor(t *testing.T) { "Host": {"example.com"}, "X-App-ID": {"abc123"}, }, - Timeout: 3, - Retries: 0, - Interval: 90, - Consecutive_up: 2, - Consecutive_down: 2, - ExpectedBody: "alive", - ExpectedCodes: "2xx", + Timeout: 3, + Retries: 0, + Interval: 90, + ConsecutiveUp: 2, + ConsecutiveDown: 2, + ExpectedBody: "alive", + ExpectedCodes: "2xx", FollowRedirects: true, AllowInsecure: true, @@ -701,13 +701,13 @@ func TestCreateLoadBalancerMonitor(t *testing.T) { "Host": {"example.com"}, "X-App-ID": {"abc123"}, }, - Timeout: 3, - Retries: 0, - Interval: 90, - Consecutive_up: 2, - Consecutive_down: 2, - ExpectedBody: "alive", - ExpectedCodes: "2xx", + Timeout: 3, + Retries: 0, + Interval: 90, + ConsecutiveUp: 2, + ConsecutiveDown: 2, + ExpectedBody: "alive", + ExpectedCodes: "2xx", FollowRedirects: true, AllowInsecure: true, @@ -791,13 +791,13 @@ func TestListLoadBalancerMonitors(t *testing.T) { "Host": {"example.com"}, "X-App-ID": {"abc123"}, }, - Timeout: 3, - Retries: 0, - Interval: 90, - Consecutive_up: 2, - Consecutive_down: 2, - ExpectedBody: "alive", - ExpectedCodes: "2xx", + Timeout: 3, + Retries: 0, + Interval: 90, + ConsecutiveUp: 2, + ConsecutiveDown: 2, + ExpectedBody: "alive", + ExpectedCodes: "2xx", }, } @@ -873,13 +873,13 @@ func TestGetLoadBalancerMonitor(t *testing.T) { "Host": {"example.com"}, "X-App-ID": {"abc123"}, }, - Timeout: 3, - Retries: 0, - Interval: 90, - Consecutive_up: 2, - Consecutive_down: 2, - ExpectedBody: "alive", - ExpectedCodes: "2xx", + Timeout: 3, + Retries: 0, + Interval: 90, + ConsecutiveUp: 2, + ConsecutiveDown: 2, + ExpectedBody: "alive", + ExpectedCodes: "2xx", FollowRedirects: true, AllowInsecure: true, @@ -1021,13 +1021,13 @@ func TestUpdateLoadBalancerMonitor(t *testing.T) { "Host": {"example.com"}, "X-App-ID": {"easy"}, }, - Timeout: 3, - Retries: 0, - Interval: 90, - Consecutive_up: 2, - Consecutive_down: 2, - ExpectedBody: "kicking", - ExpectedCodes: "200", + Timeout: 3, + Retries: 0, + Interval: 90, + ConsecutiveUp: 2, + ConsecutiveDown: 2, + ExpectedBody: "kicking", + ExpectedCodes: "200", FollowRedirects: true, AllowInsecure: true, @@ -1042,13 +1042,13 @@ func TestUpdateLoadBalancerMonitor(t *testing.T) { "Host": {"example.com"}, "X-App-ID": {"easy"}, }, - Timeout: 3, - Retries: 0, - Interval: 90, - Consecutive_up: 2, - Consecutive_down: 2, - ExpectedBody: "kicking", - ExpectedCodes: "200", + Timeout: 3, + Retries: 0, + Interval: 90, + ConsecutiveUp: 2, + ConsecutiveDown: 2, + ExpectedBody: "kicking", + ExpectedCodes: "200", FollowRedirects: true, AllowInsecure: true,