diff --git a/pkg/bus/bus_test.go b/pkg/bus/bus_test.go index 3e1338e053d..170297797bd 100644 --- a/pkg/bus/bus_test.go +++ b/pkg/bus/bus_test.go @@ -4,8 +4,9 @@ import ( "context" "testing" - "github.com/grafana/grafana/pkg/infra/tracing" "github.com/stretchr/testify/require" + + "github.com/grafana/grafana/pkg/infra/tracing" ) type testQuery struct { diff --git a/pkg/cmd/grafana-cli/commands/cli.go b/pkg/cmd/grafana-cli/commands/cli.go index eefeb65bc55..4d421fedd6d 100644 --- a/pkg/cmd/grafana-cli/commands/cli.go +++ b/pkg/cmd/grafana-cli/commands/cli.go @@ -4,10 +4,11 @@ import ( "os" "runtime" + "github.com/urfave/cli/v2" + "github.com/grafana/grafana/pkg/cmd/grafana-cli/logger" "github.com/grafana/grafana/pkg/cmd/grafana-cli/services" "github.com/grafana/grafana/pkg/cmd/grafana-cli/utils" - "github.com/urfave/cli/v2" ) // RunCLI is the entrypoint for the grafana-cli command. It returns the exit code for the grafana-cli program. diff --git a/pkg/cmd/grafana-cli/commands/commandstest/context.go b/pkg/cmd/grafana-cli/commands/commandstest/context.go index 3da4a8d754c..4ca73bfa873 100644 --- a/pkg/cmd/grafana-cli/commands/commandstest/context.go +++ b/pkg/cmd/grafana-cli/commands/commandstest/context.go @@ -3,8 +3,9 @@ package commandstest import ( "flag" - "github.com/grafana/grafana/pkg/cmd/grafana-cli/utils" "github.com/urfave/cli/v2" + + "github.com/grafana/grafana/pkg/cmd/grafana-cli/utils" ) // NewCliContext creates a new CLI context with a certain set of flags. diff --git a/pkg/cmd/grafana-cli/commands/ls_command.go b/pkg/cmd/grafana-cli/commands/ls_command.go index b23afd48ced..35c7fdd591b 100644 --- a/pkg/cmd/grafana-cli/commands/ls_command.go +++ b/pkg/cmd/grafana-cli/commands/ls_command.go @@ -4,6 +4,7 @@ import ( "errors" "github.com/fatih/color" + "github.com/grafana/grafana/pkg/cmd/grafana-cli/logger" "github.com/grafana/grafana/pkg/cmd/grafana-cli/models" "github.com/grafana/grafana/pkg/cmd/grafana-cli/services" diff --git a/pkg/cmd/grafana-cli/commands/upgrade_all_command.go b/pkg/cmd/grafana-cli/commands/upgrade_all_command.go index 9e6e655253e..759b6561bca 100644 --- a/pkg/cmd/grafana-cli/commands/upgrade_all_command.go +++ b/pkg/cmd/grafana-cli/commands/upgrade_all_command.go @@ -3,11 +3,12 @@ package commands import ( "context" + "github.com/hashicorp/go-version" + "github.com/grafana/grafana/pkg/cmd/grafana-cli/logger" "github.com/grafana/grafana/pkg/cmd/grafana-cli/models" "github.com/grafana/grafana/pkg/cmd/grafana-cli/services" "github.com/grafana/grafana/pkg/cmd/grafana-cli/utils" - "github.com/hashicorp/go-version" ) func shouldUpgrade(installed string, remote *models.Plugin) bool { diff --git a/pkg/cmd/grafana-cli/commands/upgrade_all_command_test.go b/pkg/cmd/grafana-cli/commands/upgrade_all_command_test.go index 57ea8c15dbc..c69f0a18a08 100644 --- a/pkg/cmd/grafana-cli/commands/upgrade_all_command_test.go +++ b/pkg/cmd/grafana-cli/commands/upgrade_all_command_test.go @@ -4,8 +4,9 @@ import ( "fmt" "testing" - "github.com/grafana/grafana/pkg/cmd/grafana-cli/models" "github.com/stretchr/testify/assert" + + "github.com/grafana/grafana/pkg/cmd/grafana-cli/models" ) func TestVersionComparison(t *testing.T) { diff --git a/pkg/cmd/grafana-cli/commands/upgrade_command.go b/pkg/cmd/grafana-cli/commands/upgrade_command.go index 5e7fffe9037..9e1eb5df6df 100644 --- a/pkg/cmd/grafana-cli/commands/upgrade_command.go +++ b/pkg/cmd/grafana-cli/commands/upgrade_command.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/fatih/color" + "github.com/grafana/grafana/pkg/cmd/grafana-cli/logger" "github.com/grafana/grafana/pkg/cmd/grafana-cli/services" "github.com/grafana/grafana/pkg/cmd/grafana-cli/utils" diff --git a/pkg/cmd/grafana-cli/utils/command_line.go b/pkg/cmd/grafana-cli/utils/command_line.go index 31cfc5b2e64..d8faff51969 100644 --- a/pkg/cmd/grafana-cli/utils/command_line.go +++ b/pkg/cmd/grafana-cli/utils/command_line.go @@ -3,8 +3,9 @@ package utils import ( "os" - "github.com/grafana/grafana/pkg/cmd/grafana-cli/models" "github.com/urfave/cli/v2" + + "github.com/grafana/grafana/pkg/cmd/grafana-cli/models" ) type CommandLine interface { diff --git a/pkg/cmd/grafana-server/commands/cli.go b/pkg/cmd/grafana-server/commands/cli.go index 5d8616c0baa..293bdb713c7 100644 --- a/pkg/cmd/grafana-server/commands/cli.go +++ b/pkg/cmd/grafana-server/commands/cli.go @@ -15,6 +15,8 @@ import ( "syscall" "time" + "github.com/urfave/cli/v2" + "github.com/grafana/grafana/pkg/api" "github.com/grafana/grafana/pkg/extensions" "github.com/grafana/grafana/pkg/infra/log" @@ -24,7 +26,6 @@ import ( _ "github.com/grafana/grafana/pkg/services/alerting/conditions" _ "github.com/grafana/grafana/pkg/services/alerting/notifiers" "github.com/grafana/grafana/pkg/setting" - "github.com/urfave/cli/v2" ) type ServerOptions struct { diff --git a/pkg/cmd/grafana/main.go b/pkg/cmd/grafana/main.go index edc58ed5875..b209b916fe8 100644 --- a/pkg/cmd/grafana/main.go +++ b/pkg/cmd/grafana/main.go @@ -5,9 +5,10 @@ import ( "os" "github.com/fatih/color" + "github.com/urfave/cli/v2" + gcli "github.com/grafana/grafana/pkg/cmd/grafana-cli/commands" gsrv "github.com/grafana/grafana/pkg/cmd/grafana-server/commands" - "github.com/urfave/cli/v2" ) // The following variables cannot be constants, since they can be overridden through the -X link flag diff --git a/pkg/middleware/logger_test.go b/pkg/middleware/logger_test.go index fd17c87787e..a18033960d0 100644 --- a/pkg/middleware/logger_test.go +++ b/pkg/middleware/logger_test.go @@ -3,9 +3,10 @@ package middleware import ( "testing" + "github.com/stretchr/testify/assert" + "github.com/grafana/grafana/pkg/infra/log" contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model" - "github.com/stretchr/testify/assert" ) func Test_sanitizeURL(t *testing.T) { diff --git a/pkg/middleware/middleware_basic_auth_test.go b/pkg/middleware/middleware_basic_auth_test.go index 215a819f79e..e02e2f8e92f 100644 --- a/pkg/middleware/middleware_basic_auth_test.go +++ b/pkg/middleware/middleware_basic_auth_test.go @@ -4,6 +4,9 @@ import ( "encoding/json" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/login" "github.com/grafana/grafana/pkg/services/apikey" "github.com/grafana/grafana/pkg/services/contexthandler" @@ -12,8 +15,6 @@ import ( "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/util" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestMiddlewareBasicAuth(t *testing.T) { diff --git a/pkg/middleware/middleware_jwt_auth_test.go b/pkg/middleware/middleware_jwt_auth_test.go index cc3b48c001a..3af4eaf88b6 100644 --- a/pkg/middleware/middleware_jwt_auth_test.go +++ b/pkg/middleware/middleware_jwt_auth_test.go @@ -9,9 +9,8 @@ import ( "github.com/stretchr/testify/require" "github.com/grafana/grafana/pkg/services/auth/jwt" - "github.com/grafana/grafana/pkg/services/org" - "github.com/grafana/grafana/pkg/services/contexthandler" + "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/setting" ) diff --git a/pkg/middleware/request_metrics.go b/pkg/middleware/request_metrics.go index 9706968fd2e..b37e49ebc36 100644 --- a/pkg/middleware/request_metrics.go +++ b/pkg/middleware/request_metrics.go @@ -6,12 +6,13 @@ import ( "strings" "time" + "github.com/prometheus/client_golang/prometheus" + "github.com/grafana/grafana/pkg/infra/log" "github.com/grafana/grafana/pkg/infra/metrics" "github.com/grafana/grafana/pkg/infra/tracing" "github.com/grafana/grafana/pkg/services/featuremgmt" "github.com/grafana/grafana/pkg/web" - "github.com/prometheus/client_golang/prometheus" ) var ( diff --git a/pkg/mocks/mock_gcsifaces/mocks.go b/pkg/mocks/mock_gcsifaces/mocks.go index 68fda5383d1..2a10e18b375 100644 --- a/pkg/mocks/mock_gcsifaces/mocks.go +++ b/pkg/mocks/mock_gcsifaces/mocks.go @@ -10,9 +10,10 @@ import ( storage "cloud.google.com/go/storage" gomock "github.com/golang/mock/gomock" - gcsifaces "github.com/grafana/grafana/pkg/ifaces/gcsifaces" google "golang.org/x/oauth2/google" jwt "golang.org/x/oauth2/jwt" + + gcsifaces "github.com/grafana/grafana/pkg/ifaces/gcsifaces" ) // MockStorageClient is a mock of StorageClient interface diff --git a/pkg/server/server.go b/pkg/server/server.go index c59a37e1c6f..0c06701694c 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -11,18 +11,17 @@ import ( "strconv" "sync" - "github.com/grafana/grafana/pkg/infra/usagestats/statscollector" - "github.com/grafana/grafana/pkg/services/accesscontrol" + "golang.org/x/sync/errgroup" "github.com/grafana/grafana/pkg/api" _ "github.com/grafana/grafana/pkg/extensions" "github.com/grafana/grafana/pkg/infra/log" "github.com/grafana/grafana/pkg/infra/metrics" + "github.com/grafana/grafana/pkg/infra/usagestats/statscollector" "github.com/grafana/grafana/pkg/registry" + "github.com/grafana/grafana/pkg/services/accesscontrol" "github.com/grafana/grafana/pkg/services/provisioning" - "github.com/grafana/grafana/pkg/setting" - "golang.org/x/sync/errgroup" ) // Options contains parameters for the New function. diff --git a/pkg/server/server_test.go b/pkg/server/server_test.go index be4aca1585e..6864cbe589c 100644 --- a/pkg/server/server_test.go +++ b/pkg/server/server_test.go @@ -7,11 +7,12 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/registry" "github.com/grafana/grafana/pkg/server/backgroundsvcs" "github.com/grafana/grafana/pkg/services/accesscontrol/acimpl" "github.com/grafana/grafana/pkg/setting" - "github.com/stretchr/testify/require" ) type testService struct { diff --git a/pkg/setting/date_formats_test.go b/pkg/setting/date_formats_test.go index 36048fd7302..9a4be580d84 100644 --- a/pkg/setting/date_formats_test.go +++ b/pkg/setting/date_formats_test.go @@ -3,10 +3,9 @@ package setting import ( "testing" - "gopkg.in/ini.v1" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "gopkg.in/ini.v1" ) func TestValueAsTimezone(t *testing.T) { diff --git a/pkg/setting/expanders_test.go b/pkg/setting/expanders_test.go index a4687157ddd..fbf2b6bea64 100644 --- a/pkg/setting/expanders_test.go +++ b/pkg/setting/expanders_test.go @@ -7,9 +7,8 @@ import ( "os" "testing" - "github.com/stretchr/testify/require" - "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestExpandVar_EnvSuccessful(t *testing.T) { diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go index b2b1feeb842..dbcb416f317 100644 --- a/pkg/setting/setting.go +++ b/pkg/setting/setting.go @@ -21,16 +21,15 @@ import ( "strings" "time" + "github.com/gobwas/glob" "github.com/grafana/grafana-aws-sdk/pkg/awsds" "github.com/grafana/grafana-azure-sdk-go/azsettings" "github.com/grafana/grafana-plugin-sdk-go/backend/gtime" + "github.com/prometheus/common/model" + "gopkg.in/ini.v1" "github.com/grafana/grafana/pkg/infra/log" "github.com/grafana/grafana/pkg/util" - - "github.com/gobwas/glob" - "github.com/prometheus/common/model" - "gopkg.in/ini.v1" ) type Scheme string diff --git a/pkg/setting/setting_azure_test.go b/pkg/setting/setting_azure_test.go index b5fe304df49..7df70e823b4 100644 --- a/pkg/setting/setting_azure_test.go +++ b/pkg/setting/setting_azure_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/grafana/grafana-azure-sdk-go/azsettings" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/setting/setting_feature_toggles.go b/pkg/setting/setting_feature_toggles.go index abef83d7c48..a29f24adab3 100644 --- a/pkg/setting/setting_feature_toggles.go +++ b/pkg/setting/setting_feature_toggles.go @@ -3,8 +3,9 @@ package setting import ( "strconv" - "github.com/grafana/grafana/pkg/util" "gopkg.in/ini.v1" + + "github.com/grafana/grafana/pkg/util" ) // @deprecated -- should use `featuremgmt.FeatureToggles` diff --git a/pkg/setting/setting_session_test.go b/pkg/setting/setting_session_test.go index 07554d87885..5c86811dbe7 100644 --- a/pkg/setting/setting_session_test.go +++ b/pkg/setting/setting_session_test.go @@ -4,9 +4,9 @@ import ( "path/filepath" "testing" - "github.com/grafana/grafana/pkg/infra/log/logtest" - "github.com/stretchr/testify/require" + + "github.com/grafana/grafana/pkg/infra/log/logtest" ) func TestSessionSettings(t *testing.T) { diff --git a/pkg/setting/setting_test.go b/pkg/setting/setting_test.go index e46c8ae10b4..2bc539cbeb4 100644 --- a/pkg/setting/setting_test.go +++ b/pkg/setting/setting_test.go @@ -14,7 +14,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "gopkg.in/ini.v1" ) diff --git a/pkg/setting/setting_unified_alerting.go b/pkg/setting/setting_unified_alerting.go index d81511fa3e4..d417be97417 100644 --- a/pkg/setting/setting_unified_alerting.go +++ b/pkg/setting/setting_unified_alerting.go @@ -8,11 +8,10 @@ import ( "time" "github.com/grafana/grafana-plugin-sdk-go/backend/gtime" - - "github.com/grafana/grafana/pkg/util" - "github.com/prometheus/alertmanager/cluster" "gopkg.in/ini.v1" + + "github.com/grafana/grafana/pkg/util" ) const ( diff --git a/pkg/tests/api/azuremonitor/azuremonitor_test.go b/pkg/tests/api/azuremonitor/azuremonitor_test.go index e39184e36e5..c262c7bbce0 100644 --- a/pkg/tests/api/azuremonitor/azuremonitor_test.go +++ b/pkg/tests/api/azuremonitor/azuremonitor_test.go @@ -10,13 +10,14 @@ import ( "net/http/httptest" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/tests/testinfra" - "github.com/stretchr/testify/require" ) func TestIntegrationAzureMonitor(t *testing.T) { diff --git a/pkg/tests/api/correlations/correlations_create_test.go b/pkg/tests/api/correlations/correlations_create_test.go index 182be0c70dc..3921767c6fa 100644 --- a/pkg/tests/api/correlations/correlations_create_test.go +++ b/pkg/tests/api/correlations/correlations_create_test.go @@ -7,11 +7,12 @@ import ( "net/http" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/services/correlations" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" - "github.com/stretchr/testify/require" ) func TestIntegrationCreateCorrelation(t *testing.T) { diff --git a/pkg/tests/api/correlations/correlations_delete_test.go b/pkg/tests/api/correlations/correlations_delete_test.go index defb10e4551..9002a5582d7 100644 --- a/pkg/tests/api/correlations/correlations_delete_test.go +++ b/pkg/tests/api/correlations/correlations_delete_test.go @@ -7,11 +7,12 @@ import ( "net/http" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/services/correlations" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" - "github.com/stretchr/testify/require" ) func TestIntegrationDeleteCorrelation(t *testing.T) { diff --git a/pkg/tests/api/correlations/correlations_update_test.go b/pkg/tests/api/correlations/correlations_update_test.go index 5b603f9eb71..a085abac46f 100644 --- a/pkg/tests/api/correlations/correlations_update_test.go +++ b/pkg/tests/api/correlations/correlations_update_test.go @@ -7,11 +7,12 @@ import ( "net/http" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/services/correlations" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" - "github.com/stretchr/testify/require" ) func TestIntegrationUpdateCorrelation(t *testing.T) { diff --git a/pkg/tests/api/elasticsearch/elasticsearch_test.go b/pkg/tests/api/elasticsearch/elasticsearch_test.go index 9c138f1ac5f..ad6204de604 100644 --- a/pkg/tests/api/elasticsearch/elasticsearch_test.go +++ b/pkg/tests/api/elasticsearch/elasticsearch_test.go @@ -10,13 +10,14 @@ import ( "net/http/httptest" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/tests/testinfra" - "github.com/stretchr/testify/require" ) func TestIntegrationElasticsearch(t *testing.T) { diff --git a/pkg/tests/api/graphite/graphite_test.go b/pkg/tests/api/graphite/graphite_test.go index 0b53ba56305..f70f41802e2 100644 --- a/pkg/tests/api/graphite/graphite_test.go +++ b/pkg/tests/api/graphite/graphite_test.go @@ -10,13 +10,14 @@ import ( "net/http/httptest" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/tests/testinfra" - "github.com/stretchr/testify/require" ) func TestIntegrationGraphite(t *testing.T) { diff --git a/pkg/tests/api/influxdb/influxdb_test.go b/pkg/tests/api/influxdb/influxdb_test.go index a76ba3171e7..70740bb81a9 100644 --- a/pkg/tests/api/influxdb/influxdb_test.go +++ b/pkg/tests/api/influxdb/influxdb_test.go @@ -10,13 +10,14 @@ import ( "net/http/httptest" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/tests/testinfra" - "github.com/stretchr/testify/require" ) func TestIntegrationInflux(t *testing.T) { diff --git a/pkg/tests/api/loki/loki_test.go b/pkg/tests/api/loki/loki_test.go index 9cd826b4def..6e86628ac53 100644 --- a/pkg/tests/api/loki/loki_test.go +++ b/pkg/tests/api/loki/loki_test.go @@ -10,13 +10,14 @@ import ( "net/http/httptest" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/tests/testinfra" - "github.com/stretchr/testify/require" ) func TestIntegrationLoki(t *testing.T) { diff --git a/pkg/tests/api/opentdsb/opentdsb_test.go b/pkg/tests/api/opentdsb/opentdsb_test.go index 12598b02f9d..f464757fa1a 100644 --- a/pkg/tests/api/opentdsb/opentdsb_test.go +++ b/pkg/tests/api/opentdsb/opentdsb_test.go @@ -10,13 +10,14 @@ import ( "net/http/httptest" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/tests/testinfra" - "github.com/stretchr/testify/require" ) func TestIntegrationOpenTSDB(t *testing.T) { diff --git a/pkg/tests/api/plugins/api_plugins_test.go b/pkg/tests/api/plugins/api_plugins_test.go index 251c9389310..1e7be227b39 100644 --- a/pkg/tests/api/plugins/api_plugins_test.go +++ b/pkg/tests/api/plugins/api_plugins_test.go @@ -11,15 +11,15 @@ import ( "path/filepath" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/services/org/orgimpl" "github.com/grafana/grafana/pkg/services/quota/quotaimpl" "github.com/grafana/grafana/pkg/services/sqlstore" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/services/user/userimpl" "github.com/grafana/grafana/pkg/tests/testinfra" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) const ( diff --git a/pkg/tests/api/plugins/backendplugin/backendplugin_test.go b/pkg/tests/api/plugins/backendplugin/backendplugin_test.go index 9b6f58b60a4..7630033d4ac 100644 --- a/pkg/tests/api/plugins/backendplugin/backendplugin_test.go +++ b/pkg/tests/api/plugins/backendplugin/backendplugin_test.go @@ -12,6 +12,9 @@ import ( "time" "github.com/grafana/grafana-plugin-sdk-go/backend" + "github.com/stretchr/testify/require" + "golang.org/x/oauth2" + "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/infra/log" @@ -22,8 +25,6 @@ import ( "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/tests/testinfra" - "github.com/stretchr/testify/require" - "golang.org/x/oauth2" ) const loginCookieName = "grafana_session" diff --git a/pkg/tests/api/prometheus/prometheus_test.go b/pkg/tests/api/prometheus/prometheus_test.go index eb5c0dc34f2..c5b9f258c42 100644 --- a/pkg/tests/api/prometheus/prometheus_test.go +++ b/pkg/tests/api/prometheus/prometheus_test.go @@ -10,13 +10,14 @@ import ( "net/http/httptest" "testing" + "github.com/stretchr/testify/require" + "github.com/grafana/grafana/pkg/api/dtos" "github.com/grafana/grafana/pkg/components/simplejson" "github.com/grafana/grafana/pkg/services/datasources" "github.com/grafana/grafana/pkg/services/org" "github.com/grafana/grafana/pkg/services/user" "github.com/grafana/grafana/pkg/tests/testinfra" - "github.com/stretchr/testify/require" ) func TestIntegrationPrometheus(t *testing.T) { diff --git a/pkg/tests/web/index_view_test.go b/pkg/tests/web/index_view_test.go index e2ef840ede6..8286abde819 100644 --- a/pkg/tests/web/index_view_test.go +++ b/pkg/tests/web/index_view_test.go @@ -7,9 +7,10 @@ import ( "strings" "testing" - "github.com/grafana/grafana/pkg/tests/testinfra" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/grafana/grafana/pkg/tests/testinfra" ) // TestIntegrationIndexView tests the Grafana index view.