Add adjustment factor for number of backends for secrets test

This commit is contained in:
Jeff Mitchell 2019-07-25 09:59:59 -04:00
parent 30227e3784
commit fe03781408

View File

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