mirror of
https://github.com/caddyserver/caddy.git
synced 2026-01-17 01:30:34 +00:00
Clean up metrics test code
No need to use != for booleans
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user