diff --git a/pkg/infra/appcontext/user_test.go b/pkg/infra/appcontext/user_test.go index 5122d9044e0..6db4735b647 100644 --- a/pkg/infra/appcontext/user_test.go +++ b/pkg/infra/appcontext/user_test.go @@ -6,13 +6,14 @@ import ( "math/big" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/infra/appcontext" "github.com/grafana/grafana/pkg/infra/tracing" "github.com/grafana/grafana/pkg/services/contexthandler/ctxkey" contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model" grpccontext "github.com/grafana/grafana/pkg/services/grpcserver/context" "github.com/grafana/grafana/pkg/services/user" - "github.com/stretchr/testify/require" ) func TestUserFromContext(t *testing.T) { diff --git a/pkg/infra/log/file_test.go b/pkg/infra/log/file_test.go index f6361e152a3..aaa21f8ead2 100644 --- a/pkg/infra/log/file_test.go +++ b/pkg/infra/log/file_test.go @@ -4,9 +4,8 @@ import ( "os" "testing" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func (w *FileLogWriter) WriteLine(line string) error { diff --git a/pkg/infra/metrics/metrics.go b/pkg/infra/metrics/metrics.go index c70040c7c40..ee9017cac53 100644 --- a/pkg/infra/metrics/metrics.go +++ b/pkg/infra/metrics/metrics.go @@ -3,10 +3,11 @@ package metrics import ( "runtime" + "github.com/prometheus/client_golang/prometheus" + "github.com/grafana/grafana/pkg/infra/metrics/metricutil" pubdash "github.com/grafana/grafana/pkg/services/publicdashboards/models" "github.com/grafana/grafana/pkg/setting" - "github.com/prometheus/client_golang/prometheus" ) // ExporterName is used as namespace for exposing prometheus metrics diff --git a/pkg/infra/metrics/settings.go b/pkg/infra/metrics/settings.go index cde0e447b28..e07f5533a00 100644 --- a/pkg/infra/metrics/settings.go +++ b/pkg/infra/metrics/settings.go @@ -5,9 +5,10 @@ import ( "strings" "time" + "github.com/prometheus/client_golang/prometheus" + "github.com/grafana/grafana/pkg/infra/metrics/graphitebridge" "github.com/grafana/grafana/pkg/setting" - "github.com/prometheus/client_golang/prometheus" ) func (im *InternalMetricsService) readSettings() error { diff --git a/pkg/infra/remotecache/memcached_storage.go b/pkg/infra/remotecache/memcached_storage.go index b8c1b4e4823..f8601eb1a2d 100644 --- a/pkg/infra/remotecache/memcached_storage.go +++ b/pkg/infra/remotecache/memcached_storage.go @@ -5,6 +5,7 @@ import ( "time" "github.com/bradfitz/gomemcache/memcache" + "github.com/grafana/grafana/pkg/setting" ) diff --git a/pkg/infra/remotecache/redis_storage.go b/pkg/infra/remotecache/redis_storage.go index 7c76345a5bf..f8ed10d5bb8 100644 --- a/pkg/infra/remotecache/redis_storage.go +++ b/pkg/infra/remotecache/redis_storage.go @@ -9,6 +9,7 @@ import ( "time" "github.com/go-redis/redis/v8" + "github.com/grafana/grafana/pkg/setting" ) diff --git a/pkg/infra/tracing/optentelemetry_tracing_test.go b/pkg/infra/tracing/optentelemetry_tracing_test.go index 01e817da776..690edb80070 100644 --- a/pkg/infra/tracing/optentelemetry_tracing_test.go +++ b/pkg/infra/tracing/optentelemetry_tracing_test.go @@ -3,9 +3,10 @@ package tracing import ( "testing" - "github.com/grafana/grafana/pkg/setting" "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/attribute" + + "github.com/grafana/grafana/pkg/setting" ) func TestSplitCustomAttribs(t *testing.T) { diff --git a/pkg/infra/tracing/tracing_test.go b/pkg/infra/tracing/tracing_test.go index d40390b5276..6c2a01b4c45 100644 --- a/pkg/infra/tracing/tracing_test.go +++ b/pkg/infra/tracing/tracing_test.go @@ -4,9 +4,10 @@ import ( "os" "testing" - "github.com/grafana/grafana/pkg/setting" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/grafana/grafana/pkg/setting" ) func TestGroupSplit(t *testing.T) { diff --git a/pkg/infra/usagestats/statscollector/prometheus_flavor_test.go b/pkg/infra/usagestats/statscollector/prometheus_flavor_test.go index b0f4cad6d2a..69d85caf58b 100644 --- a/pkg/infra/usagestats/statscollector/prometheus_flavor_test.go +++ b/pkg/infra/usagestats/statscollector/prometheus_flavor_test.go @@ -8,7 +8,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "github.com/grafana/grafana/pkg/infra/db/dbtest" diff --git a/pkg/infra/usagestats/statscollector/service_test.go b/pkg/infra/usagestats/statscollector/service_test.go index 0200588e3f1..cb8074dedb1 100644 --- a/pkg/infra/usagestats/statscollector/service_test.go +++ b/pkg/infra/usagestats/statscollector/service_test.go @@ -7,13 +7,11 @@ import ( "testing" "time" - "github.com/grafana/grafana/pkg/components/simplejson" - sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/infra/db" "github.com/grafana/grafana/pkg/infra/db/dbtest" "github.com/grafana/grafana/pkg/infra/httpclient"