mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
cli: Improve error handling for plugin commands (#24250)
* Stop supporting vault plugin info and deregister without a type argument * Make a best-effort attempt to report whether a plugin was actually deregistered and give more descriptive errors * Fix error message for vault plugin reload
This commit is contained in:
@@ -46,13 +46,13 @@ func TestPluginReloadCommand_Run(t *testing.T) {
|
||||
{
|
||||
"not_enough_args",
|
||||
nil,
|
||||
"Not enough arguments",
|
||||
"No plugins specified, must specify exactly one of -plugin or -mounts",
|
||||
1,
|
||||
},
|
||||
{
|
||||
"too_many_args",
|
||||
[]string{"-plugin", "foo", "-mounts", "bar"},
|
||||
"Too many arguments",
|
||||
"Must specify exactly one of -plugin or -mounts",
|
||||
1,
|
||||
},
|
||||
}
|
||||
@@ -147,7 +147,7 @@ func TestPluginReloadStatusCommand_Run(t *testing.T) {
|
||||
client, closer := testVaultServer(t)
|
||||
defer closer()
|
||||
|
||||
ui, cmd := testPluginReloadCommand(t)
|
||||
ui, cmd := testPluginReloadStatusCommand(t)
|
||||
cmd.client = client
|
||||
|
||||
args := append([]string{}, tc.args...)
|
||||
|
||||
Reference in New Issue
Block a user