Skip to content

Commit 06c46fc

Browse files
author
Rage Lopez
committed
Fix CI: ruff format whitespace + strip CRLF from conformance run-server.sh
1 parent b9e6381 commit 06c46fc

2 files changed

Lines changed: 38 additions & 38 deletions

File tree

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
#!/bin/bash
2-
set -e
3-
4-
PORT="${PORT:-3001}"
5-
SERVER_URL="http://localhost:${PORT}/mcp"
6-
7-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8-
cd "$SCRIPT_DIR/../../.."
9-
10-
# Start everything-server
11-
uv run --frozen mcp-everything-server --port "$PORT" &
12-
SERVER_PID=$!
13-
trap "kill $SERVER_PID 2>/dev/null || true; wait $SERVER_PID 2>/dev/null || true" EXIT
14-
15-
# Wait for server to be ready
16-
MAX_RETRIES=30
17-
RETRY_COUNT=0
18-
while ! curl -s "$SERVER_URL" > /dev/null 2>&1; do
19-
RETRY_COUNT=$((RETRY_COUNT + 1))
20-
if [ $RETRY_COUNT -ge $MAX_RETRIES ]; then
21-
echo "Server failed to start after ${MAX_RETRIES} retries" >&2
22-
exit 1
23-
fi
24-
sleep 0.5
25-
done
26-
27-
echo "Server ready at $SERVER_URL"
28-
29-
# Run conformance tests
30-
npx @modelcontextprotocol/conformance@0.1.10 server --url "$SERVER_URL" "$@"
1+
#!/bin/bash
2+
set -e
3+
4+
PORT="${PORT:-3001}"
5+
SERVER_URL="http://localhost:${PORT}/mcp"
6+
7+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8+
cd "$SCRIPT_DIR/../../.."
9+
10+
# Start everything-server
11+
uv run --frozen mcp-everything-server --port "$PORT" &
12+
SERVER_PID=$!
13+
trap "kill $SERVER_PID 2>/dev/null || true; wait $SERVER_PID 2>/dev/null || true" EXIT
14+
15+
# Wait for server to be ready
16+
MAX_RETRIES=30
17+
RETRY_COUNT=0
18+
while ! curl -s "$SERVER_URL" > /dev/null 2>&1; do
19+
RETRY_COUNT=$((RETRY_COUNT + 1))
20+
if [ $RETRY_COUNT -ge $MAX_RETRIES ]; then
21+
echo "Server failed to start after ${MAX_RETRIES} retries" >&2
22+
exit 1
23+
fi
24+
sleep 0.5
25+
done
26+
27+
echo "Server ready at $SERVER_URL"
28+
29+
# Run conformance tests
30+
npx @modelcontextprotocol/conformance@0.1.10 server --url "$SERVER_URL" "$@"

tests/shared/test_streamable_http.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2241,14 +2241,14 @@ async def test_streamable_http_client_does_not_mutate_provided_client(
22412241

22422242
# Verify client headers were not mutated with MCP protocol headers
22432243
# If accept header exists, it should still be httpx default, not MCP's
2244-
if "accept" in custom_client.headers: # pragma: no branch
2245-
assert custom_client.headers.get("accept") == "*/*" # pragma: lax no cover
2246-
# MCP content-type should not have been added
2247-
assert custom_client.headers.get("content-type") != "application/json" # pragma: lax no cover
2248-
2249-
# Verify custom headers are still present and unchanged
2250-
assert custom_client.headers.get("X-Custom-Header") == "custom-value" # pragma: lax no cover
2251-
assert custom_client.headers.get("Authorization") == "Bearer test-token" # pragma: lax no cover
2244+
if "accept" in custom_client.headers: # pragma: no branch
2245+
assert custom_client.headers.get("accept") == "*/*" # pragma: lax no cover
2246+
# MCP content-type should not have been added
2247+
assert custom_client.headers.get("content-type") != "application/json" # pragma: lax no cover
2248+
2249+
# Verify custom headers are still present and unchanged
2250+
assert custom_client.headers.get("X-Custom-Header") == "custom-value" # pragma: lax no cover
2251+
assert custom_client.headers.get("Authorization") == "Bearer test-token" # pragma: lax no cover
22522252

22532253

22542254
@pytest.mark.anyio

0 commit comments

Comments
 (0)