From fe0378140898ddc32ca12b23a5f4873c06012a85 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 25 Jul 2019 09:59:59 -0400 Subject: [PATCH] Add adjustment factor for number of backends for secrets test --- command/secrets_enable_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/secrets_enable_test.go b/command/secrets_enable_test.go index 588dc6ade4..1ece3ce3b3 100644 --- a/command/secrets_enable_test.go +++ b/command/secrets_enable_test.go @@ -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)) }