Prometheus: Show executed query in inspector (#45362)

* Prometheus: Show executed query in inspector

* Loki: Improving test
This commit is contained in:
Torkel Ödegaard
2022-02-15 15:02:03 +01:00
committed by GitHub
parent b9e5bae51f
commit a757a57c6e
14 changed files with 59 additions and 26 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"os"
"path/filepath"
"testing"
"time"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/experimental"
@@ -41,7 +42,7 @@ func TestSuccessResponse(t *testing.T) {
bytes, err := os.ReadFile(responseFileName)
require.NoError(t, err)
frames, err := runQuery(makeMockedClient(200, "application/json", bytes), &lokiQuery{})
frames, err := runQuery(makeMockedClient(200, "application/json", bytes), &lokiQuery{Expr: "up(ALERTS)", Step: time.Second * 42})
require.NoError(t, err)
dr := &backend.DataResponse{