mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 13:22:21 +08:00
Plugins: Create single point of entry for adding / removing plugins (#55463)
* split out plugin manager * remove whitespace * fix tests * split up tests * updating naming conventions * simplify manager * tidy * explorations * fix build * tidy * fix tests * add logger helper * pass the tests * tidying * fix tests * tidy and re-add test * store depends on loader * enrich tests * fix test * undo gomod changes
This commit is contained in:
@ -49,7 +49,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/tsdb/testdatasource"
|
||||
)
|
||||
|
||||
func TestIntegrationPluginManager_Run(t *testing.T) {
|
||||
func TestIntegrationPluginManager(t *testing.T) {
|
||||
t.Helper()
|
||||
|
||||
staticRootPath, err := filepath.Abs("../../../public/")
|
||||
@ -110,16 +110,15 @@ func TestIntegrationPluginManager_Run(t *testing.T) {
|
||||
|
||||
pCfg := config.ProvideConfig(setting.ProvideProvider(cfg), cfg)
|
||||
reg := registry.ProvideService()
|
||||
pm, err := ProvideService(pCfg, cfg, reg, loader.New(pCfg, license, signature.NewUnsignedAuthorizer(pCfg),
|
||||
provider.ProvideService(coreRegistry)), nil)
|
||||
l := loader.ProvideService(pCfg, license, signature.NewUnsignedAuthorizer(pCfg), reg, provider.ProvideService(coreRegistry))
|
||||
ps, err := store.ProvideService(cfg, pCfg, reg, l)
|
||||
require.NoError(t, err)
|
||||
ps := store.ProvideService(reg)
|
||||
|
||||
ctx := context.Background()
|
||||
verifyCorePluginCatalogue(t, ctx, ps)
|
||||
verifyBundledPlugins(t, ctx, ps)
|
||||
verifyPluginStaticRoutes(t, ctx, ps)
|
||||
verifyBackendProcesses(t, pm.pluginRegistry.Plugins(ctx))
|
||||
verifyBackendProcesses(t, reg.Plugins(ctx))
|
||||
verifyPluginQuery(t, ctx, client.ProvideService(reg))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user