Use direct API calls
Fixes: prometheus/http_test.go:117:5⚠️ should use resp.Body.String() instead of string(resp.Body.Bytes()) (S1030) (megacheck) prometheus/http_test.go:118:56⚠️ should use resp.Body.String() instead of string(resp.Body.Bytes()) (S1030) (megacheck) Signed-off-by: Karsten Weiss <knweiss@gmail.com>
This commit is contained in:
parent
e11c6ff817
commit
daa9993ded
|
@ -114,8 +114,8 @@ func TestInstrumentHandler(t *testing.T) {
|
|||
if resp.Code != http.StatusTeapot {
|
||||
t.Fatalf("expected status %d, got %d", http.StatusTeapot, resp.Code)
|
||||
}
|
||||
if string(resp.Body.Bytes()) != "Howdy there!" {
|
||||
t.Fatalf("expected body %s, got %s", "Howdy there!", string(resp.Body.Bytes()))
|
||||
if resp.Body.String() != "Howdy there!" {
|
||||
t.Fatalf("expected body %s, got %s", "Howdy there!", resp.Body.String())
|
||||
}
|
||||
|
||||
out := &dto.Metric{}
|
||||
|
|
Loading…
Reference in New Issue