File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -935,8 +935,14 @@ func TestHTTPScrapeEndpoint(t *testing.T) {
935935 ts := httptest .NewServer (http .HandlerFunc (e .ScrapeHandler ))
936936 defer ts .Close ()
937937
938- u := fmt .Sprintf (ts .URL + "/?target=%s" , os .Getenv ("TEST_REDIS_URI" ))
939- body := downloadURL (t , u )
938+ v := url.Values {}
939+ v .Add ("target" , os .Getenv ("TEST_REDIS_URI" ))
940+ v .Add ("check-single-keys" , dbNumStrFull + "=" + url .QueryEscape (keys [0 ]))
941+
942+ u , _ := url .Parse (ts .URL )
943+ u .RawQuery = v .Encode ()
944+
945+ body := downloadURL (t , u .String ())
940946
941947 wants := []string {
942948 // metrics
@@ -960,6 +966,9 @@ func TestHTTPScrapeEndpoint(t *testing.T) {
960966 `standalone` ,
961967 `cmd="get"` ,
962968
969+ `test_key_size{db="db11",key="` + keys [0 ] + `"} 7` ,
970+ `test_key_value{db="db11",key="` + keys [0 ] + `"} 1234.56` ,
971+
963972 `test_db_keys{db="db11"} 11` ,
964973 `test_db_keys_expiring{db="db11"} ` ,
965974 }
You can’t perform that action at this time.
0 commit comments