mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 16:57:14 -06:00
Chore: Remove unused code/dependencies in testdata datasource (#69386)
This commit is contained in:
parent
cf1945d0c3
commit
dcc1169ab2
@ -61,7 +61,7 @@ func TestCallResource(t *testing.T) {
|
||||
cfg.Azure = &azsettings.AzureSettings{}
|
||||
|
||||
coreRegistry := coreplugin.ProvideCoreRegistry(nil, &cloudwatch.CloudWatchService{}, nil, nil, nil, nil,
|
||||
nil, nil, nil, nil, testdatasource.ProvideService(cfg, featuremgmt.WithFeatures()), nil, nil, nil, nil, nil, nil)
|
||||
nil, nil, nil, nil, testdatasource.ProvideService(cfg), nil, nil, nil, nil, nil, nil)
|
||||
pCfg, err := config.ProvideConfig(setting.ProvideProvider(cfg), cfg, featuremgmt.WithFeatures())
|
||||
require.NoError(t, err)
|
||||
reg := registry.ProvideService()
|
||||
|
@ -102,7 +102,7 @@ func TestIntegrationPluginManager(t *testing.T) {
|
||||
otsdb := opentsdb.ProvideService(hcp)
|
||||
pr := prometheus.ProvideService(hcp, cfg, features, tracer)
|
||||
tmpo := tempo.ProvideService(hcp)
|
||||
td := testdatasource.ProvideService(cfg, features)
|
||||
td := testdatasource.ProvideService(cfg)
|
||||
pg := postgres.ProvideService(cfg)
|
||||
my := mysql.ProvideService(cfg, hcp)
|
||||
ms := mssql.ProvideService(cfg)
|
||||
|
@ -17,9 +17,7 @@ func TestCSVFileScenario(t *testing.T) {
|
||||
cfg.DataPath = t.TempDir()
|
||||
cfg.StaticRootPath = "../../../public"
|
||||
|
||||
s := &Service{
|
||||
cfg: cfg,
|
||||
}
|
||||
s := &Service{}
|
||||
|
||||
t.Run("loadCsvFile", func(t *testing.T) {
|
||||
files := []string{"simple", "mixed", "labels"}
|
||||
|
@ -10,14 +10,12 @@ import (
|
||||
"github.com/grafana/grafana-plugin-sdk-go/data"
|
||||
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/tsdb/testdatasource/sims"
|
||||
)
|
||||
|
||||
func ProvideService(cfg *setting.Cfg, features featuremgmt.FeatureToggles) *Service {
|
||||
func ProvideService(cfg *setting.Cfg) *Service {
|
||||
s := &Service{
|
||||
features: features,
|
||||
queryMux: datasource.NewQueryTypeMux(),
|
||||
scenarios: map[string]*Scenario{},
|
||||
frame: data.NewFrame("testdata",
|
||||
@ -55,7 +53,6 @@ type Service struct {
|
||||
labelFrame *data.Frame
|
||||
queryMux *datasource.QueryTypeMux
|
||||
resourceHandler backend.CallResourceHandler
|
||||
features featuremgmt.FeatureToggles
|
||||
sims *sims.SimulationEngine
|
||||
}
|
||||
|
||||
|
@ -8,15 +8,11 @@ import (
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/experimental"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestUSAScenario(t *testing.T) {
|
||||
cfg := setting.NewCfg()
|
||||
p := &Service{
|
||||
cfg: cfg,
|
||||
}
|
||||
p := &Service{}
|
||||
|
||||
t.Run("usa query modes", func(t *testing.T) {
|
||||
start := time.Date(2020, time.January, 10, 23, 0, 0, 0, time.UTC)
|
||||
|
Loading…
Reference in New Issue
Block a user