diff --git a/server/handler_test.go b/server/handler_test.go index 9dc38f8de..4a1323452 100644 --- a/server/handler_test.go +++ b/server/handler_test.go @@ -381,6 +381,23 @@ func TestHandler_Endpoints(t *testing.T) { } }) + t.Run("Metrics", func(t *testing.T) { + w := httptest.NewRecorder() + h.ServeHTTP(w, test.MustNewHTTPRequest("GET", "/metrics", nil)) + if w.Code != gohttp.StatusOK { + t.Fatalf("unexpected status code: %d", w.Code) + } + }) + + t.Run("Metrics.json", func(t *testing.T) { + w := httptest.NewRecorder() + h.ServeHTTP(w, test.MustNewHTTPRequest("GET", "/metrics.json", nil)) + if w.Code != gohttp.StatusOK { + t.Fatalf("unexpected status code: %d", w.Code) + } + mustJSONDecode(t, w.Body) + }) + t.Run("Abort no resize job", func(t *testing.T) { w := httptest.NewRecorder() h.ServeHTTP(w, test.MustNewHTTPRequest("POST", "/cluster/resize/abort", nil))