mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-26 08:02:16 +00:00
Fix miscellaneous issues revealed by Go 1.10 (#1256)
* provider/mem: fix format verbs in tests * api: fix format verb
This commit is contained in:
parent
0f9c9a0bb0
commit
29e441f88f
@ -799,7 +799,7 @@ func (api *API) respondError(w http.ResponseWriter, apiErr apiError, data interf
|
||||
case errorInternal:
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
default:
|
||||
panic(fmt.Sprintf("unknown error type %q", apiErr))
|
||||
panic(fmt.Sprintf("unknown error type %q", apiErr.Error()))
|
||||
}
|
||||
|
||||
b, err := json.Marshal(&response{
|
||||
|
@ -134,7 +134,7 @@ func TestAlertsSubscribe(t *testing.T) {
|
||||
}
|
||||
|
||||
if len(expectedAlerts) != 0 {
|
||||
t.Fatalf("Unexpected number of alerts: %s", len(expectedAlerts))
|
||||
t.Fatalf("Unexpected number of alerts: %d", len(expectedAlerts))
|
||||
}
|
||||
}()
|
||||
|
||||
@ -158,7 +158,7 @@ func TestAlertsSubscribe(t *testing.T) {
|
||||
}
|
||||
|
||||
if len(expectedAlerts) != 0 {
|
||||
t.Fatalf("Unexpected number of alerts: %s", len(expectedAlerts))
|
||||
t.Fatalf("Unexpected number of alerts: %d", len(expectedAlerts))
|
||||
}
|
||||
}()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user