mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 20:36:26 +02:00
Fix unit tests broken with JWT plugin update
This commit is contained in:
parent
c11d7189de
commit
9408c3b8a2
@ -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…
x
Reference in New Issue
Block a user