mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 19:52:35 +08:00
Plugins: Set grafana config, plugin version and user agent on plugin requests (#75171)
* first pass * fixup * remove test line * fix tests * use new fields * fix imports + formatting * fix tests * rollback changes * undo whitespace * apply pr feedback
This commit is contained in:
@ -12,6 +12,8 @@ import (
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/infra/tracing"
|
||||
"github.com/grafana/grafana/pkg/plugins"
|
||||
"github.com/grafana/grafana/pkg/plugins/config"
|
||||
pluginFakes "github.com/grafana/grafana/pkg/plugins/manager/fakes"
|
||||
"github.com/grafana/grafana/pkg/services/datasources"
|
||||
datafakes "github.com/grafana/grafana/pkg/services/datasources/fakes"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
@ -54,11 +56,11 @@ func framesPassThroughService(t *testing.T, frames data.Frames) (data.Frames, er
|
||||
cfg: cfg,
|
||||
dataService: me,
|
||||
features: &featuremgmt.FeatureManager{},
|
||||
pCtxProvider: plugincontext.ProvideService(nil, &pluginstore.FakePluginStore{
|
||||
pCtxProvider: plugincontext.ProvideService(cfg, nil, &pluginstore.FakePluginStore{
|
||||
PluginList: []pluginstore.Plugin{
|
||||
{JSONData: plugins.JSONData{ID: "test"}},
|
||||
}},
|
||||
&datafakes.FakeDataSourceService{}, nil),
|
||||
&datafakes.FakeDataSourceService{}, nil, pluginFakes.NewFakeLicensingService(), &config.Cfg{}),
|
||||
tracer: tracing.InitializeTracerForTest(),
|
||||
metrics: newMetrics(nil),
|
||||
}
|
||||
|
Reference in New Issue
Block a user