Prometheus: Fix passing of custom params when running queries (#42728)

* Prometheus: Fix passing of custom params

* Remove prints
This commit is contained in:
Ivana Huckova
2021-12-03 16:28:05 +01:00
committed by GitHub
parent 8722c19cc3
commit 21fe78302b
2 changed files with 18 additions and 3 deletions
@@ -114,7 +114,9 @@ func TestCustomQueryParametersMiddleware(t *testing.T) {
mw := customQueryParametersMiddleware(log.New("test"))
rt := mw.CreateMiddleware(httpclient.Options{
CustomOptions: map[string]interface{}{
customQueryParametersKey: "custom=par/am&second=f oo",
grafanaDataKey: map[string]interface{}{
customQueryParametersKey: "custom=par/am&second=f oo",
},
},
}, finalRoundTripper)
require.NotNil(t, rt)
@@ -144,7 +146,9 @@ func TestCustomQueryParametersMiddleware(t *testing.T) {
mw := customQueryParametersMiddleware(log.New("test"))
rt := mw.CreateMiddleware(httpclient.Options{
CustomOptions: map[string]interface{}{
customQueryParametersKey: "custom=par/am&second=f oo",
grafanaDataKey: map[string]interface{}{
customQueryParametersKey: "custom=par/am&second=f oo",
},
},
}, finalRoundTripper)
require.NotNil(t, rt)