Fix unit tests broken with JWT plugin update
This commit is contained in:
parent
e5ca13d0be
commit
8be2951472
|
@ -64,6 +64,7 @@ func TestExitAfterAuth(t *testing.T) {
|
|||
}
|
||||
|
||||
_, err = client.Logical().Write("auth/jwt/role/test", map[string]interface{}{
|
||||
"role_type": "jwt",
|
||||
"bound_subject": "r3qXcK2bix9eFECzsU3Sbmh0K16fatW6@clients",
|
||||
"bound_audiences": "https://vault.plugin.auth.jwt.test",
|
||||
"user_claim": "https://vault/user",
|
||||
|
|
|
@ -175,7 +175,8 @@ func TestAuthEnableCommand_Run(t *testing.T) {
|
|||
|
||||
// Add 1 to account for the "token" backend, which is visible when you walk the filesystem but
|
||||
// is treated as special and excluded from the registry.
|
||||
expected := len(builtinplugins.Registry.Keys(consts.PluginTypeCredential)) + 1
|
||||
// Subtract 1 to account for "oidc" which is an alias of "jwt" and not a separate plugin.
|
||||
expected := len(builtinplugins.Registry.Keys(consts.PluginTypeCredential))
|
||||
if len(backends) != expected {
|
||||
t.Fatalf("expected %d credential backends, got %d", expected, len(backends))
|
||||
}
|
||||
|
|
|
@ -352,6 +352,7 @@ func TestPredict_Plugins(t *testing.T) {
|
|||
"mysql-legacy-database-plugin",
|
||||
"mysql-rds-database-plugin",
|
||||
"nomad",
|
||||
"oidc",
|
||||
"okta",
|
||||
"pki",
|
||||
"postgresql",
|
||||
|
|
Loading…
Reference in New Issue