mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Code cleaning with unit tests in promlib (#99542)
* update request tests * remove unused functions * add unit tests * remove commented code * fix unit tests
This commit is contained in:
@@ -43,7 +43,7 @@ func BenchmarkExemplarJson(b *testing.B) {
|
||||
StatusCode: 200,
|
||||
Body: io.NopCloser(bytes.NewReader(responseBytes)),
|
||||
}
|
||||
tCtx.httpProvider.setResponse(&res)
|
||||
tCtx.httpProvider.setResponse(&res, &res)
|
||||
resp, err := tCtx.queryData.Execute(context.Background(), query)
|
||||
require.NoError(b, err)
|
||||
for _, r := range resp.Responses {
|
||||
@@ -74,7 +74,7 @@ func BenchmarkRangeJson(b *testing.B) {
|
||||
StatusCode: 200,
|
||||
Body: io.NopCloser(bytes.NewReader(body)),
|
||||
}
|
||||
tCtx.httpProvider.setResponse(&res)
|
||||
tCtx.httpProvider.setResponse(&res, &res)
|
||||
r, err = tCtx.queryData.Execute(context.Background(), q)
|
||||
require.NoError(b, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user