mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 12:26:34 +02:00
Add adjustment factor for number of backends for secrets test
This commit is contained in:
parent
30227e3784
commit
fe03781408
@ -10,6 +10,10 @@ import (
|
||||
"github.com/mitchellh/cli"
|
||||
)
|
||||
|
||||
var (
|
||||
logicalBackendAdjustmentFactor = 1
|
||||
)
|
||||
|
||||
func testSecretsEnableCommand(tb testing.TB) (*cli.MockUi, *SecretsEnableCommand) {
|
||||
tb.Helper()
|
||||
|
||||
@ -211,7 +215,7 @@ func TestSecretsEnableCommand_Run(t *testing.T) {
|
||||
|
||||
// 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 {
|
||||
if len(backends) != len(builtinplugins.Registry.Keys(consts.PluginTypeSecrets))+logicalBackendAdjustmentFactor {
|
||||
t.Fatalf("expected %d logical backends, got %d", len(builtinplugins.Registry.Keys(consts.PluginTypeSecrets))+1, len(backends))
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user