Skip to content

Commit 5614c15

Browse files
committed
Fixed tools/list for mock server and addressed coderabbit
- Also removed authentication from `mcp.feature`
1 parent bc00db3 commit 5614c15

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

tests/e2e/features/mcp.feature

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ Feature: MCP tests
2020
"""
2121
And The headers of the response contains the following header "www-authenticate"
2222

23-
Scenario: Check if query endpoint reports error error when mcp requires authentication
23+
Scenario: Check if query endpoint reports error when mcp requires authentication
2424
Given The system is in default state
25-
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
26-
When I use "query" to ask question with authorization header
25+
When I use "query" to ask question
2726
"""
2827
{"query": "Say hello", "model": "{MODEL}", "provider": "{PROVIDER}"}
2928
"""
@@ -39,10 +38,9 @@ Feature: MCP tests
3938
"""
4039
And The headers of the response contains the following header "www-authenticate"
4140

42-
Scenario: Check if streaming_query endpoint reports error error when mcp requires authentication
41+
Scenario: Check if streaming_query endpoint reports error when mcp requires authentication
4342
Given The system is in default state
44-
And I set the Authorization header to Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
45-
When I use "streaming_query" to ask question with authorization header
43+
When I use "streaming_query" to ask question
4644
"""
4745
{"query": "Say hello", "model": "{MODEL}", "provider": "{PROVIDER}"}
4846
"""

tests/e2e/mock_mcp_server/server.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,19 @@ def do_POST(self) -> None: # pylint: disable=invalid-name
8585
"id": req_id,
8686
"result": {
8787
"tools": [
88-
{
89-
"name": "mock_tool",
90-
"description": "Mock tool for E2E",
91-
"inputSchema": {"type": "object"},
92-
}
88+
{
89+
"name": "mock_tool_e2e",
90+
"description": "Mock tool for E2E",
91+
"inputSchema": {
92+
"type": "object",
93+
"properties": {
94+
"message": {
95+
"type": "string",
96+
"description": "Test message",
97+
}
98+
},
99+
},
100+
}
93101
],
94102
},
95103
}

0 commit comments

Comments
 (0)