mirror of
https://github.com/prymitive/karma
synced 2026-05-23 04:42:58 +00:00
fix(backend): run make format
This commit is contained in:
committed by
Łukasz Mierzwa
parent
799f2cc2c1
commit
0b68886c43
@@ -327,7 +327,8 @@ func countAlerts(uri string, timeout time.Duration, transport http.RoundTripper,
|
||||
ctx,
|
||||
[]string{`{__name__="ALERTS_FOR_STATE"}`},
|
||||
time.Now().Add(time.Minute*-5),
|
||||
time.Now())
|
||||
time.Now(),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to query Prometheus for label names: %w", err)
|
||||
}
|
||||
|
||||
@@ -191,7 +191,8 @@ func TestAlertHistory(t *testing.T) {
|
||||
},
|
||||
values: generateIntSlice(0, 1, 24),
|
||||
},
|
||||
}, time.Hour),
|
||||
}, time.Hour,
|
||||
),
|
||||
}),
|
||||
},
|
||||
},
|
||||
@@ -302,7 +303,8 @@ func TestAlertHistory(t *testing.T) {
|
||||
},
|
||||
values: generateIntSlice(0, 1, 24),
|
||||
},
|
||||
}, time.Hour),
|
||||
}, time.Hour,
|
||||
),
|
||||
}),
|
||||
},
|
||||
},
|
||||
@@ -373,7 +375,8 @@ func TestAlertHistory(t *testing.T) {
|
||||
},
|
||||
values: generateIntSlice(0, 1, 24),
|
||||
},
|
||||
}, time.Hour),
|
||||
}, time.Hour,
|
||||
),
|
||||
}),
|
||||
},
|
||||
},
|
||||
@@ -432,7 +435,8 @@ func TestAlertHistory(t *testing.T) {
|
||||
},
|
||||
values: generateIntSlice(0, 1, 24),
|
||||
},
|
||||
}, time.Hour),
|
||||
}, time.Hour,
|
||||
),
|
||||
}),
|
||||
},
|
||||
},
|
||||
@@ -491,7 +495,8 @@ func TestAlertHistory(t *testing.T) {
|
||||
},
|
||||
values: generateIntSlice(0, 1, 24),
|
||||
},
|
||||
}, time.Hour),
|
||||
}, time.Hour,
|
||||
),
|
||||
}),
|
||||
},
|
||||
},
|
||||
@@ -559,7 +564,8 @@ func TestAlertHistory(t *testing.T) {
|
||||
},
|
||||
values: generateIntSlice(0, 1, 24),
|
||||
},
|
||||
}, time.Hour),
|
||||
}, time.Hour,
|
||||
),
|
||||
}),
|
||||
},
|
||||
},
|
||||
|
||||
@@ -177,13 +177,15 @@ func setupRouterProxyHandlers(router *chi.Mux, alertmanager *alertmanager.Alertm
|
||||
proxy := NewAlertmanagerProxy(alertmanager)
|
||||
router.Post(
|
||||
proxyPath(alertmanager.Name, "/api/v2/silences"),
|
||||
handlePostRequest(alertmanager, http.StripPrefix(proxyPathPrefix(alertmanager.Name), proxy)))
|
||||
handlePostRequest(alertmanager, http.StripPrefix(proxyPathPrefix(alertmanager.Name), proxy)),
|
||||
)
|
||||
router.Delete(
|
||||
proxyPath(alertmanager.Name, "/api/v2/silence/{id}"),
|
||||
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
h := http.StripPrefix(proxyPathPrefix(alertmanager.Name), proxy)
|
||||
h.ServeHTTP(w, r)
|
||||
}))
|
||||
}),
|
||||
)
|
||||
}
|
||||
|
||||
// this fixes a problem with go-chi usage of RawPath
|
||||
|
||||
Reference in New Issue
Block a user