mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmalert: properly handle nil req passed to requestToCurl()
This fixes a panic in the TestAlertingRule_Exec_Negative test.
The panic has been introduced in the commit b97bd01605
This commit is contained in:
parent
c5dd973f9c
commit
6f0179405a
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ func (cw *curlWriter) add(str string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func requestToCurl(req *http.Request) string {
|
func requestToCurl(req *http.Request) string {
|
||||||
if req.URL == nil {
|
if req == nil || req.URL == nil {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue