mirror of
https://github.com/grafana/grafana.git
synced 2025-09-28 21:43:48 +08:00
Plugins: Fix loading of dist folders (#80015)
* end to end * tidy * fix whitespace * remove unused code * fix linter * fix gosec + add sort * fix test * apply cr feedback
This commit is contained in:
@ -51,30 +51,20 @@ func TestIntegrationPluginManager(t *testing.T) {
|
||||
bundledPluginsPath, err := filepath.Abs("../../../plugins-bundled/internal")
|
||||
require.NoError(t, err)
|
||||
|
||||
// We use the raw config here as it forms the basis for the setting.Provider implementation
|
||||
// The plugin manager also relies directly on the setting.Cfg struct to provide Grafana specific
|
||||
// properties such as the loading paths
|
||||
raw, err := ini.Load([]byte(`
|
||||
app_mode = production
|
||||
|
||||
[plugin.test-app]
|
||||
path=../../plugins/manager/testdata/test-app
|
||||
|
||||
[plugin.test-panel]
|
||||
not=included
|
||||
`),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
features := featuremgmt.WithFeatures()
|
||||
cfg := &setting.Cfg{
|
||||
Raw: raw,
|
||||
Raw: ini.Empty(),
|
||||
StaticRootPath: staticRootPath,
|
||||
BundledPluginsPath: bundledPluginsPath,
|
||||
Azure: &azsettings.AzureSettings{},
|
||||
|
||||
// nolint:staticcheck
|
||||
IsFeatureToggleEnabled: features.IsEnabledGlobally,
|
||||
PluginSettings: map[string]map[string]string{
|
||||
"test-app": {
|
||||
"path": "../../plugins/manager/testdata/test-app",
|
||||
},
|
||||
"test-panel": {
|
||||
"not": "included",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
tracer := tracing.InitializeTracerForTest()
|
||||
|
Reference in New Issue
Block a user