diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1161b33..f27ae5e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -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 \ No newline at end of file + run: python -m pytest -s mcp_server/tests/test_container.py \ No newline at end of file diff --git a/mcp_server/Dockerfile.mcp b/mcp_server/Dockerfile.mcp index 7c578e6..09a6767 100644 --- a/mcp_server/Dockerfile.mcp +++ b/mcp_server/Dockerfile.mcp @@ -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 diff --git a/mcp_server/tests/test_container.py b/mcp_server/tests/test_container.py index c81b0f0..0536de9 100644 --- a/mcp_server/tests/test_container.py +++ b/mcp_server/tests/test_container.py @@ -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.")