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:
Tom Proctor
2023-11-28 14:13:26 +00:00
committed by GitHub
parent 030bba4e68
commit 51d99fc7cf
7 changed files with 95 additions and 30 deletions

View File

@@ -34,6 +34,12 @@ func TestPluginInfoCommand_Run(t *testing.T) {
out string
code int
}{
{
"not_enough_args",
[]string{"foo"},
"Not enough arguments",
1,
},
{
"too_many_args",
[]string{"foo", "bar", "fizz"},