mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
tidy up (#49720)
This commit is contained in:
parent
f5d25c91f6
commit
4fae0f49d7
@ -622,12 +622,9 @@ func (f *fakePluginInstaller) GetUpdateInfo(_ context.Context, _, _, _ string) (
|
||||
}
|
||||
|
||||
type fakeLoader struct {
|
||||
mockedLoadedPlugins []*plugins.Plugin
|
||||
mockedFactoryLoadedPlugin *plugins.Plugin
|
||||
mockedLoadedPlugins []*plugins.Plugin
|
||||
|
||||
loadedPaths []string
|
||||
|
||||
plugins.Loader
|
||||
}
|
||||
|
||||
func (l *fakeLoader) Load(_ context.Context, _ plugins.Class, paths []string, _ map[string]struct{}) ([]*plugins.Plugin, error) {
|
||||
@ -636,12 +633,6 @@ func (l *fakeLoader) Load(_ context.Context, _ plugins.Class, paths []string, _
|
||||
return l.mockedLoadedPlugins, nil
|
||||
}
|
||||
|
||||
func (l *fakeLoader) LoadWithFactory(_ context.Context, _ plugins.Class, path string, _ backendplugin.PluginFactoryFunc) (*plugins.Plugin, error) {
|
||||
l.loadedPaths = append(l.loadedPaths, path)
|
||||
|
||||
return l.mockedFactoryLoadedPlugin, nil
|
||||
}
|
||||
|
||||
type fakePluginClient struct {
|
||||
pluginID string
|
||||
logger log.Logger
|
||||
|
@ -27,7 +27,7 @@ func (s *Validator) Validate(plugin *plugins.Plugin) *plugins.SignatureError {
|
||||
if plugin.Parent != nil {
|
||||
if plugin.IsCorePlugin() || plugin.Signature == plugins.SignatureInternal {
|
||||
s.log.Debug("Not setting descendant plugin's signature to that of root since it's core or internal",
|
||||
"plugin", plugin.ID, "signature", plugin.Signature, "isCore", plugin.IsCorePlugin)
|
||||
"plugin", plugin.ID, "signature", plugin.Signature, "isCore", plugin.IsCorePlugin())
|
||||
} else {
|
||||
s.log.Debug("Setting descendant plugin's signature to that of root", "plugin", plugin.ID,
|
||||
"root", plugin.Parent.ID, "signature", plugin.Signature, "rootSignature", plugin.Parent.Signature)
|
||||
|
Loading…
Reference in New Issue
Block a user