fix: update expected auth tools list for login-flow scope test
The login-flow MCP server exposes 3 additional auth tools (nc_auth_provision_access, nc_auth_check_status, nc_auth_update_scopes) from ADR-022 that require only 'openid' scope. Update the no-custom-scopes test to expect 7 auth tools instead of 4. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
aeddc28ca6
commit
86f350ab49
@@ -415,24 +415,27 @@ async def test_jwt_with_no_custom_scopes_returns_zero_tools(
|
||||
|
||||
tool_names = [tool.name for tool in result.tools]
|
||||
logger.info(
|
||||
f"JWT token with no custom scopes sees {len(tool_names)} tools (should be 4 OAuth tools)"
|
||||
f"JWT token with no custom scopes sees {len(tool_names)} tools (should be 7 auth tools)"
|
||||
)
|
||||
|
||||
# Only OAuth provisioning tools should be visible (they require 'openid' scope)
|
||||
expected_oauth_tools = [
|
||||
# Only auth/provisioning tools should be visible (they require 'openid' scope)
|
||||
expected_auth_tools = [
|
||||
"provision_nextcloud_access",
|
||||
"revoke_nextcloud_access",
|
||||
"check_provisioning_status",
|
||||
"check_logged_in", # Login elicitation tool (ADR-006)
|
||||
"nc_auth_provision_access", # Login Flow v2 (ADR-022)
|
||||
"nc_auth_check_status", # Login Flow v2
|
||||
"nc_auth_update_scopes", # Login Flow v2
|
||||
]
|
||||
|
||||
assert set(tool_names) == set(expected_oauth_tools), (
|
||||
f"Expected only OAuth provisioning tools {expected_oauth_tools} "
|
||||
assert set(tool_names) == set(expected_auth_tools), (
|
||||
f"Expected only auth/provisioning tools {expected_auth_tools} "
|
||||
f"but got {tool_names}"
|
||||
)
|
||||
|
||||
logger.info(
|
||||
f"✅ JWT token with only openid scope correctly shows {len(tool_names)} OAuth provisioning tools, "
|
||||
f"✅ JWT token with only openid scope correctly shows {len(tool_names)} auth tools, "
|
||||
"resource tools filtered out"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user