@@ -72,25 +72,6 @@ func (c *apiTestClient) Do(_ context.Context, req *http.Request) (*http.Response
7272 c .Errorf ("unexpected request method: want %s, got %s" , test .reqMethod , req .Method )
7373 }
7474
75- var vals url.Values
76- switch test .reqMethod {
77- case http .MethodGet :
78- if req .URL .RawQuery != "" {
79- vals = req .URL .Query ()
80- }
81- case http .MethodPost :
82- if req .Body != nil {
83- reqBody , _ := io .ReadAll (req .Body )
84- vals , _ = url .ParseQuery (string (reqBody ))
85- } else if req .URL .RawQuery != "" {
86- vals = req .URL .Query ()
87- }
88- }
89-
90- if ! reflect .DeepEqual (vals , test .reqParam ) {
91- c .Fatalf ("unexpected request parameters: want %s, got %s" , vals , test .reqParam )
92- }
93-
9475 b , err := json .Marshal (test .inRes )
9576 if err != nil {
9677 c .Fatal (err )
@@ -375,7 +356,7 @@ func TestAPIs(t *testing.T) {
375356 inWarnings : []string {"a" },
376357 reqMethod : "GET" ,
377358 reqPath : "/api/v1/labels" ,
378- res : []string {"val1" , "val2" },
359+ res : []string {"val1" , "val2" },
379360 },
380361
381362 {
@@ -414,7 +395,7 @@ func TestAPIs(t *testing.T) {
414395 inWarnings : []string {"a" },
415396 reqMethod : "GET" ,
416397 reqPath : "/api/v1/label/mylabel/values" ,
417- res : model.LabelValues {"val1" , "val2" },
398+ res : model.LabelValues {"val1" , "val2" },
418399 },
419400
420401 {
@@ -430,7 +411,7 @@ func TestAPIs(t *testing.T) {
430411 inWarnings : []string {"a" },
431412 reqMethod : "GET" ,
432413 reqPath : "/api/v1/label/mylabel/values" ,
433- err : errors .New ("some error" ),
414+ err : errors .New ("some error" ),
434415 },
435416 {
436417 do : doLabelValues ([]string {"up" }, "mylabel" , testTime .Add (- 100 * time .Hour ), testTime ),
@@ -1170,24 +1151,14 @@ func TestAPIs(t *testing.T) {
11701151 do : doQueryExemplars ("tns_request_duration_seconds_bucket" , testTime .Add (- 1 * time .Minute ), testTime ),
11711152 reqMethod : "GET" ,
11721153 reqPath : "/api/v1/query_exemplars" ,
1173- reqParam : url.Values {
1174- "query" : []string {"tns_request_duration_seconds_bucket" },
1175- "start" : []string {formatTime (testTime .Add (- 1 * time .Minute ))},
1176- "end" : []string {formatTime (testTime )},
1177- },
1178- inErr : errors .New ("some error" ),
1179- err : errors .New ("some error" ),
1154+ inErr : errors .New ("some error" ),
1155+ err : errors .New ("some error" ),
11801156 },
11811157
11821158 {
11831159 do : doQueryExemplars ("tns_request_duration_seconds_bucket" , testTime .Add (- 1 * time .Minute ), testTime ),
11841160 reqMethod : "GET" ,
11851161 reqPath : "/api/v1/query_exemplars" ,
1186- reqParam : url.Values {
1187- "query" : []string {"tns_request_duration_seconds_bucket" },
1188- "start" : []string {formatTime (testTime .Add (- 1 * time .Minute ))},
1189- "end" : []string {formatTime (testTime )},
1190- },
11911162 inRes : []interface {}{
11921163 map [string ]interface {}{
11931164 "seriesLabels" : map [string ]interface {}{
0 commit comments