fix formatting

This commit is contained in:
tarat44 2021-10-04 22:12:26 -04:00
parent c1ed3a9a94
commit 1e8e44d442
3 changed files with 14 additions and 14 deletions

View File

@ -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,
},
}

View File

@ -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 {

View File

@ -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