diff --git a/agent/agent_test.go b/agent/agent_test.go index 2ac66ffe65..00adf33230 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -861,12 +861,12 @@ func TestAgent_AddServiceWithH2CPINGCheck(t *testing.T) { defer a.Shutdown() check := []*structs.CheckType{ { - CheckID: "test-h2cping-check", - Name: "test-h2cping-check", - H2PING: "localhost:12345", - TLSSkipVerify: true, - Interval: 10 * time.Second, - H2PingUseTLS: false, + CheckID: "test-h2cping-check", + Name: "test-h2cping-check", + H2PING: "localhost:12345", + TLSSkipVerify: true, + Interval: 10 * time.Second, + H2PingUseTLS: false, }, } diff --git a/agent/structs/check_definition.go b/agent/structs/check_definition.go index 66ca85188b..d9d54dcb4d 100644 --- a/agent/structs/check_definition.go +++ b/agent/structs/check_definition.go @@ -77,8 +77,8 @@ func (t *CheckDefinition) UnmarshalJSON(data []byte) (err error) { Alias: (*Alias)(t), } - aux.H2PingUseTLS = true - aux.H2PingUseTLSSnake = true + aux.H2PingUseTLS = true + aux.H2PingUseTLSSnake = true if err = lib.UnmarshalJSON(data, &aux); err != nil { return err } @@ -108,9 +108,9 @@ func (t *CheckDefinition) UnmarshalJSON(data []byte) (err error) { if t.ServiceID == "" { t.ServiceID = aux.ServiceIDSnake } - if !aux.H2PingUseTLSSnake { - t.H2PingUseTLS = aux.H2PingUseTLSSnake - } + if !aux.H2PingUseTLSSnake { + t.H2PingUseTLS = aux.H2PingUseTLSSnake + } // Parse special values if aux.Interval != nil { diff --git a/agent/structs/check_type.go b/agent/structs/check_type.go index 6d375d0940..00eff8e23e 100644 --- a/agent/structs/check_type.go +++ b/agent/structs/check_type.go @@ -159,9 +159,9 @@ func (t *CheckType) UnmarshalJSON(data []byte) (err error) { t.DeregisterCriticalServiceAfter = time.Duration(v) } } - if !aux.H2PingUseTLSSnake { - t.H2PingUseTLS = aux.H2PingUseTLSSnake - } + if !aux.H2PingUseTLSSnake { + t.H2PingUseTLS = aux.H2PingUseTLSSnake + } return nil