This commit is contained in:
Will Browne 2022-05-30 09:54:28 +02:00 committed by GitHub
parent f5d25c91f6
commit 4fae0f49d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 11 deletions

View File

@ -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

View File

@ -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)