Support version selection for database plugins (#16982)

* Support version selection for database plugins
* Don't consider unversioned plugins for version selection algorithm
* Added version to 'plugin not found' error
* Add PluginFactoryVersion function to avoid changing sdk/ API
This commit is contained in:
Tom Proctor
2022-09-09 17:32:28 +01:00
committed by GitHub
parent 24c9b42f8c
commit 688469b66d
19 changed files with 370 additions and 49 deletions

View File

@@ -2,6 +2,7 @@ package plugin
import (
"context"
"errors"
"testing"
"github.com/hashicorp/vault/sdk/helper/logging"
@@ -193,3 +194,7 @@ func (v testSystemView) LookupPluginVersion(context.Context, string, consts.Plug
},
}, nil
}
func (v testSystemView) ListVersionedPlugins(_ context.Context, _ consts.PluginType) ([]pluginutil.VersionedPlugin, error) {
return nil, errors.New("ListVersionedPlugins not implemented for testSystemView")
}