mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Refactor plugin catalog and plugin runtime catalog into their own package (#24403)
* Refactor plugin catalog into its own package * Fix some unnecessarily slow tests due to accidentally running multiple plugin processes * Clean up MakeTestPluginDir helper * Move getBackendVersion tests to plugin catalog package * Use corehelpers.MakeTestPlugin consistently * Fix semgrep failure: check for nil value from logical.Storage
This commit is contained in:
@@ -61,6 +61,7 @@ import (
|
||||
sr "github.com/hashicorp/vault/serviceregistration"
|
||||
"github.com/hashicorp/vault/vault"
|
||||
"github.com/hashicorp/vault/vault/hcp_link"
|
||||
"github.com/hashicorp/vault/vault/plugincatalog"
|
||||
vaultseal "github.com/hashicorp/vault/vault/seal"
|
||||
"github.com/hashicorp/vault/version"
|
||||
"github.com/mitchellh/go-testing-interface"
|
||||
@@ -3152,7 +3153,7 @@ func initDevCore(c *ServerCommand, coreConfig *vault.CoreConfig, config *server.
|
||||
for _, name := range list {
|
||||
path := filepath.Join(f.Name(), name)
|
||||
if err := c.addPlugin(path, init.RootToken, core); err != nil {
|
||||
if !errwrap.Contains(err, vault.ErrPluginBadType.Error()) {
|
||||
if !errwrap.Contains(err, plugincatalog.ErrPluginBadType.Error()) {
|
||||
return fmt.Errorf("Error enabling plugin %s: %s", name, err)
|
||||
}
|
||||
pluginsNotLoaded = append(pluginsNotLoaded, name)
|
||||
|
||||
Reference in New Issue
Block a user