Make base predict test kmip friendly

This commit is contained in:
Jeff Mitchell 2019-06-20 20:57:46 -04:00
parent 07dcdc8b79
commit f70ddb9dee
1 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"testing"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/sdk/helper/strutil"
"github.com/posener/complete"
)
@ -380,6 +381,15 @@ func TestPredict_Plugins(t *testing.T) {
p.client = tc.client
act := p.plugins()
if !strutil.StrListContains(act, "kmip") {
for i, v := range exp {
if v == "kmip" {
exp = append(exp[:i], exp[i+1:]...)
break
}
}
}
if !reflect.DeepEqual(act, tc.exp) {
t.Errorf("expected %q to be %q", act, tc.exp)
}