mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
fix formatting
This commit is contained in:
parent
c1ed3a9a94
commit
1e8e44d442
@ -861,12 +861,12 @@ func TestAgent_AddServiceWithH2CPINGCheck(t *testing.T) {
|
|||||||
defer a.Shutdown()
|
defer a.Shutdown()
|
||||||
check := []*structs.CheckType{
|
check := []*structs.CheckType{
|
||||||
{
|
{
|
||||||
CheckID: "test-h2cping-check",
|
CheckID: "test-h2cping-check",
|
||||||
Name: "test-h2cping-check",
|
Name: "test-h2cping-check",
|
||||||
H2PING: "localhost:12345",
|
H2PING: "localhost:12345",
|
||||||
TLSSkipVerify: true,
|
TLSSkipVerify: true,
|
||||||
Interval: 10 * time.Second,
|
Interval: 10 * time.Second,
|
||||||
H2PingUseTLS: false,
|
H2PingUseTLS: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,8 +77,8 @@ func (t *CheckDefinition) UnmarshalJSON(data []byte) (err error) {
|
|||||||
Alias: (*Alias)(t),
|
Alias: (*Alias)(t),
|
||||||
}
|
}
|
||||||
|
|
||||||
aux.H2PingUseTLS = true
|
aux.H2PingUseTLS = true
|
||||||
aux.H2PingUseTLSSnake = true
|
aux.H2PingUseTLSSnake = true
|
||||||
if err = lib.UnmarshalJSON(data, &aux); err != nil {
|
if err = lib.UnmarshalJSON(data, &aux); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -108,9 +108,9 @@ func (t *CheckDefinition) UnmarshalJSON(data []byte) (err error) {
|
|||||||
if t.ServiceID == "" {
|
if t.ServiceID == "" {
|
||||||
t.ServiceID = aux.ServiceIDSnake
|
t.ServiceID = aux.ServiceIDSnake
|
||||||
}
|
}
|
||||||
if !aux.H2PingUseTLSSnake {
|
if !aux.H2PingUseTLSSnake {
|
||||||
t.H2PingUseTLS = aux.H2PingUseTLSSnake
|
t.H2PingUseTLS = aux.H2PingUseTLSSnake
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse special values
|
// Parse special values
|
||||||
if aux.Interval != nil {
|
if aux.Interval != nil {
|
||||||
|
@ -159,9 +159,9 @@ func (t *CheckType) UnmarshalJSON(data []byte) (err error) {
|
|||||||
t.DeregisterCriticalServiceAfter = time.Duration(v)
|
t.DeregisterCriticalServiceAfter = time.Duration(v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !aux.H2PingUseTLSSnake {
|
if !aux.H2PingUseTLSSnake {
|
||||||
t.H2PingUseTLS = aux.H2PingUseTLSSnake
|
t.H2PingUseTLS = aux.H2PingUseTLSSnake
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user