diff --git a/command/base_predict_test.go b/command/base_predict_test.go index 731a02bd36..95b52b8313 100644 --- a/command/base_predict_test.go +++ b/command/base_predict_test.go @@ -390,6 +390,7 @@ func TestPredict_Plugins(t *testing.T) { "redshift-database-plugin", "ssh", "totp", + "transform", "transit", "userpass", }, @@ -415,6 +416,14 @@ func TestPredict_Plugins(t *testing.T) { } } } + if !strutil.StrListContains(act, "transform") { + for i, v := range tc.exp { + if v == "transform" { + tc.exp = append(tc.exp[:i], tc.exp[i+1:]...) + break + } + } + } if !reflect.DeepEqual(act, tc.exp) { t.Errorf("expected:%q, got: %q", tc.exp, act) } diff --git a/command/secrets_enable_test.go b/command/secrets_enable_test.go index 1ece3ce3b3..48dc923254 100644 --- a/command/secrets_enable_test.go +++ b/command/secrets_enable_test.go @@ -11,6 +11,8 @@ import ( ) var ( + // logicalBackendAdjustmentFactor is set to 1 for the database backend + // which is a plugin but not found in go.mod files logicalBackendAdjustmentFactor = 1 ) @@ -216,7 +218,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))+logicalBackendAdjustmentFactor { - t.Fatalf("expected %d logical backends, got %d", len(builtinplugins.Registry.Keys(consts.PluginTypeSecrets))+1, len(backends)) + t.Fatalf("expected %d logical backends, got %d", len(builtinplugins.Registry.Keys(consts.PluginTypeSecrets))+logicalBackendAdjustmentFactor, len(backends)) } for _, b := range backends {