Plugins: Add simple plugin sources service (#63814)

add simple plugin sources svc
This commit is contained in:
Will Browne
2023-02-28 15:27:11 +01:00
committed by GitHub
parent b2c0175777
commit ab8de1a0e3
9 changed files with 143 additions and 50 deletions
+3 -1
View File
@@ -25,6 +25,7 @@ import (
"github.com/grafana/grafana/pkg/plugins/manager/loader/assetpath"
"github.com/grafana/grafana/pkg/plugins/manager/registry"
"github.com/grafana/grafana/pkg/plugins/manager/signature"
"github.com/grafana/grafana/pkg/plugins/manager/sources"
"github.com/grafana/grafana/pkg/plugins/manager/store"
"github.com/grafana/grafana/pkg/plugins/plugincontext"
"github.com/grafana/grafana/pkg/plugins/pluginscdn"
@@ -60,7 +61,8 @@ func TestCallResource(t *testing.T) {
cdn := pluginscdn.ProvideService(pCfg)
l := loader.ProvideService(pCfg, fakes.NewFakeLicensingService(), signature.NewUnsignedAuthorizer(pCfg),
reg, provider.ProvideService(coreRegistry), fakes.NewFakeRoleRegistry(), cdn, assetpath.ProvideService(cdn))
ps, err := store.ProvideService(cfg, pCfg, reg, l)
srcs := sources.ProvideService(cfg, pCfg)
ps, err := store.ProvideService(reg, srcs, l)
require.NoError(t, err)
pcp := plugincontext.ProvideService(localcache.ProvideService(), ps, &datasources.FakeCacheService{}, &datasources.FakeDataSourceService{}, pluginSettings.ProvideService(db.InitTestDB(t), nil))