Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/integration/test_server_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,6 @@ def test_server_jwks_endpoint(server_health_check):
def test_server_agent_registry_endpoint(server_health_check):
"""Test: Server has agent registry endpoint."""
resp = requests.get(f"{API_BASE_URL}/v1/agents")
# May return 404 or empty list depending on implementation
assert resp.status_code in [200, 404]
# May return 200 (list), 404 (not implemented), or 401 (auth required)
assert resp.status_code in [200, 401, 404]
Comment on lines +411 to +412

Copilot AI May 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is only checking endpoint reachability, consider also accepting HTTP 403 here. The same test module treats 401/403 as auth failures (see validate endpoint), and some auth middleware returns 403 instead of 401 when unauthenticated/unauthorized, which would make this contract test fail unnecessarily.

Suggested change
# May return 200 (list), 404 (not implemented), or 401 (auth required)
assert resp.status_code in [200, 401, 404]
# May return 200 (list), 401/403 (auth required), or 404 (not implemented)
assert resp.status_code in [200, 401, 403, 404]

Copilot uses AI. Check for mistakes.
Comment on lines 410 to +412

Copilot AI May 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a small request timeout to this GET (similar to the server health check) so the integration suite can’t hang indefinitely if the server is reachable but not responding.

Copilot uses AI. Check for mistakes.
print("✓ Agent registry endpoint accessible")
Loading