mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-17 20:05:17 +00:00
Fix up linting issue
Fix `govet` linting issue: `printf: non-constant format string`. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
parent
17afd4c021
commit
e2c4e1e5cf
@ -213,7 +213,7 @@ func TestAlertsPut(t *testing.T) {
|
||||
}
|
||||
if !alertsEqual(res, a) {
|
||||
t.Errorf("Unexpected alert: %d", i)
|
||||
t.Fatalf(pretty.Compare(res, a))
|
||||
t.Fatal(pretty.Compare(res, a))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -294,7 +294,7 @@ func TestAlertsSubscribe(t *testing.T) {
|
||||
close(fatalc)
|
||||
fatal, ok := <-fatalc
|
||||
if ok {
|
||||
t.Fatalf(fatal)
|
||||
t.Fatal(fatal)
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,7 +318,7 @@ func TestAlertsGetPending(t *testing.T) {
|
||||
expected := expectedAlerts[actual.Fingerprint()]
|
||||
if !alertsEqual(actual, expected) {
|
||||
t.Errorf("Unexpected alert")
|
||||
t.Fatalf(pretty.Compare(actual, expected))
|
||||
t.Fatal(pretty.Compare(actual, expected))
|
||||
}
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ func TestAlertsGetPending(t *testing.T) {
|
||||
expected := expectedAlerts[actual.Fingerprint()]
|
||||
if !alertsEqual(actual, expected) {
|
||||
t.Errorf("Unexpected alert")
|
||||
t.Fatalf(pretty.Compare(actual, expected))
|
||||
t.Fatal(pretty.Compare(actual, expected))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -425,7 +425,7 @@ func TestAlertsStoreCallback(t *testing.T) {
|
||||
}
|
||||
if !alertsEqual(a, &alert1Mod) {
|
||||
t.Errorf("Unexpected alert")
|
||||
t.Fatalf(pretty.Compare(a, &alert1Mod))
|
||||
t.Fatal(pretty.Compare(a, &alert1Mod))
|
||||
}
|
||||
|
||||
// Now wait until existing alerts are GC-ed, and make sure that callback was called.
|
||||
|
Loading…
Reference in New Issue
Block a user