mirror of
https://github.com/grafana/grafana.git
synced 2026-08-26 13:27:30 -05:00
Chore: Update tests and import orders in prometheus backend (#81732)
* use fmt instead of grafana-cli/log * reorder imports * reorder imports
This commit is contained in:
@@ -2,6 +2,7 @@ package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"testing"
|
||||
@@ -10,7 +11,6 @@ import (
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
|
||||
"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
|
||||
)
|
||||
|
||||
@@ -44,7 +44,7 @@ func TestClient(t *testing.T) {
|
||||
defer func() {
|
||||
if res != nil && res.Body != nil {
|
||||
if err := res.Body.Close(); err != nil {
|
||||
logger.Warn("Error", "err", err)
|
||||
fmt.Println("Error", "err", err)
|
||||
}
|
||||
}
|
||||
}()
|
||||
@@ -68,7 +68,7 @@ func TestClient(t *testing.T) {
|
||||
defer func() {
|
||||
if res != nil && res.Body != nil {
|
||||
if err := res.Body.Close(); err != nil {
|
||||
logger.Warn("Error", "err", err)
|
||||
fmt.Println("Error", "err", err)
|
||||
}
|
||||
}
|
||||
}()
|
||||
@@ -98,7 +98,7 @@ func TestClient(t *testing.T) {
|
||||
defer func() {
|
||||
if res != nil && res.Body != nil {
|
||||
if err := res.Body.Close(); err != nil {
|
||||
logger.Warn("Error", "err", err)
|
||||
fmt.Println("Error", "err", err)
|
||||
}
|
||||
}
|
||||
}()
|
||||
@@ -125,7 +125,7 @@ func TestClient(t *testing.T) {
|
||||
defer func() {
|
||||
if res != nil && res.Body != nil {
|
||||
if err := res.Body.Close(); err != nil {
|
||||
logger.Warn("Error", "err", err)
|
||||
fmt.Println("Error", "err", err)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend/log"
|
||||
|
||||
"github.com/grafana/grafana/pkg/tsdb/prometheus/kinds/dataquery"
|
||||
"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
|
||||
)
|
||||
|
||||
@@ -14,9 +14,10 @@ import (
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/experimental"
|
||||
"github.com/grafana/grafana/pkg/tsdb/prometheus/kinds/dataquery"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/grafana/grafana/pkg/tsdb/prometheus/kinds/dataquery"
|
||||
|
||||
"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user