1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

Clean up metrics test code

No need to use != for booleans
This commit is contained in:
Matthew Holt 2022-08-16 10:03:19 -06:00
parent a479943acd
commit a944de4ab7
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -21,7 +21,7 @@ func TestMetricsUnmarshalCaddyfile(t *testing.T) {
t.Errorf("unexpected error: %v", err)
}
if m.DisableOpenMetrics != false {
if m.DisableOpenMetrics {
t.Errorf("DisableOpenMetrics should've been false: %v", m.DisableOpenMetrics)
}
@ -32,7 +32,7 @@ func TestMetricsUnmarshalCaddyfile(t *testing.T) {
t.Errorf("unexpected error: %v", err)
}
if m.DisableOpenMetrics != true {
if !m.DisableOpenMetrics {
t.Errorf("DisableOpenMetrics should've been true: %v", m.DisableOpenMetrics)
}