Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ jobs:
- name: Test MCP Server Container
env:
MCP_SERVER_URL: http://localhost:8000/mcp
run: python -m pytest mcp_server/tests/test_container.py
run: python -m pytest -s mcp_server/tests/test_container.py
1 change: 0 additions & 1 deletion mcp_server/Dockerfile.mcp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM python:3.11

RUN apt-get update && apt-get install -y cmake make g++
COPY mcp_server /src/mcp_server
WORKDIR /src
RUN pip install -r mcp_server/requirements.txt
Expand Down
27 changes: 22 additions & 5 deletions mcp_server/tests/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,27 @@ async def test_planner_tool_t(self) -> None:

payload = await client.call_tool(
"KstarPlannerUnorderedTopQ",
{"domain": domain, "problem": problem},
{"domain": domain, "problem": problem, "quality_bound": 20.0, "num_plans": 1000},
)
assert payload is not None
assert len(payload.structured_content["plans"]) == 1

assertion_status_payload = payload is not None
assert assertion_status_payload, "Payload is empty."
if assertion_status_payload:
print("Payload is not empty.")

assertion_status_plans = len(payload.structured_content["plans"]) == 1000
assert assertion_status_plans, "The number of plans returned by KstarPlannerUnorderedTopQ is not 1000."
if assertion_status_payload:
print("The number of plans returned by KstarPlannerUnorderedTopQ is 1000.")

optimal_plan = payload.structured_content["plans"][0]
assert len(optimal_plan["actions"]) == 4
assert optimal_plan["cost"] == 4

assertion_status_actions = len(optimal_plan["actions"]) == 4
assert assertion_status_actions, "The number of actions found in the optimal plan returned by KstarPlannerUnorderedTopQ is not 4."
if assertion_status_actions:
print("Four actions are found in the optimal plan returned by KstarPlannerUnorderedTopQ.")

assertion_status_cost = optimal_plan["cost"] == 4
assert assertion_status_cost, "The cost of the optimal plan returned by KstarPlannerUnorderedTopQ is not 4."
if assertion_status_cost:
print("The cost of the optimal plan returned by KstarPlannerUnorderedTopQ is 4.")
Loading