mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
cli/api: Update plugin listing to always include version info in the response (#17347)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -36,7 +37,7 @@ func TestPluginListCommand_Run(t *testing.T) {
|
||||
{
|
||||
"lists",
|
||||
nil,
|
||||
"Plugins",
|
||||
"Name\\s+Type\\s+Version",
|
||||
0,
|
||||
},
|
||||
}
|
||||
@@ -62,7 +63,8 @@ func TestPluginListCommand_Run(t *testing.T) {
|
||||
}
|
||||
|
||||
combined := ui.OutputWriter.String() + ui.ErrorWriter.String()
|
||||
if !strings.Contains(combined, tc.out) {
|
||||
matcher := regexp.MustCompile(tc.out)
|
||||
if !matcher.MatchString(combined) {
|
||||
t.Errorf("expected %q to contain %q", combined, tc.out)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user