From bd858421cd8dea5fbbe0a119ea5f6ef5866bf2dc Mon Sep 17 00:00:00 2001 From: Joe Elliott Date: Wed, 11 Dec 2019 09:36:49 -0500 Subject: [PATCH] Fixed TestDoGetFallback test Signed-off-by: Joe Elliott --- api/prometheus/v1/api_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/prometheus/v1/api_test.go b/api/prometheus/v1/api_test.go index 374d6cd..d872834 100644 --- a/api/prometheus/v1/api_test.go +++ b/api/prometheus/v1/api_test.go @@ -1268,12 +1268,16 @@ func TestDoGetFallback(t *testing.T) { // Start a local HTTP server. server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { req.ParseForm() - r := &testResponse{ + testResp, _ := json.Marshal(&testResponse{ Values: req.Form.Encode(), Method: req.Method, + }) + + apiResp := &apiResponse{ + Data: testResp, } - body, _ := json.Marshal(r) + body, _ := json.Marshal(apiResp) if req.Method == http.MethodPost { if req.URL.Path == "/blockPost" {