mirror of https://github.com/status-im/consul.git
fix formatting
This commit is contained in:
parent
c1ed3a9a94
commit
1e8e44d442
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue