mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Run all builtins as plugins (#5536)
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/vault/helper/builtinplugins"
|
||||
"github.com/hashicorp/vault/helper/consts"
|
||||
"github.com/mitchellh/cli"
|
||||
)
|
||||
|
||||
@@ -201,9 +203,10 @@ func TestSecretsEnableCommand_Run(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Removing one from logical list since plugin is a virtual backend
|
||||
if len(backends) != len(logicalBackends)-1 {
|
||||
t.Fatalf("expected %d logical backends, got %d", len(logicalBackends)-1, len(backends))
|
||||
// backends are found by walking the directory, which includes the database backend,
|
||||
// however, the plugins registry omits that one
|
||||
if len(backends) != len(builtinplugins.Registry.Keys(consts.PluginTypeSecrets))+1 {
|
||||
t.Fatalf("expected %d logical backends, got %d", len(builtinplugins.Registry.Keys(consts.PluginTypeSecrets))+1, len(backends))
|
||||
}
|
||||
|
||||
for _, b := range backends {
|
||||
|
||||
Reference in New Issue
Block a user