DataSources: Remove unused cfg from core Grafana data source (#56188)

* remove unused cfg from grafana ds

* fix test
This commit is contained in:
Will Browne
2022-10-04 12:32:25 +02:00
committed by GitHub
parent 2d433194d0
commit 1038ac7308
2 changed files with 4 additions and 5 deletions

View File

@@ -96,7 +96,7 @@ func TestIntegrationPluginManager(t *testing.T) {
my := mysql.ProvideService(cfg, hcp)
ms := mssql.ProvideService(cfg)
sv2 := searchV2.ProvideService(cfg, sqlstore.InitTestDB(t), nil, nil, tracer, features, nil, nil)
graf := grafanads.ProvideService(cfg, sv2, nil)
graf := grafanads.ProvideService(sv2, nil)
coreRegistry := coreplugin.ProvideCoreRegistry(am, cw, cm, es, grap, idb, lk, otsdb, pr, tmpo, td, pg, my, ms, graf)

View File

@@ -14,7 +14,6 @@ import (
"github.com/grafana/grafana/pkg/services/datasources"
"github.com/grafana/grafana/pkg/services/searchV2"
"github.com/grafana/grafana/pkg/services/store"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/tsdb/testdatasource"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
@@ -51,11 +50,11 @@ var (
)
)
func ProvideService(cfg *setting.Cfg, search searchV2.SearchService, store store.StorageService) *Service {
return newService(cfg, search, store)
func ProvideService(search searchV2.SearchService, store store.StorageService) *Service {
return newService(search, store)
}
func newService(cfg *setting.Cfg, search searchV2.SearchService, store store.StorageService) *Service {
func newService(search searchV2.SearchService, store store.StorageService) *Service {
s := &Service{
search: search,
store: store,