@@ -56,46 +56,8 @@ function validate_microservice() {
5656 exit 1
5757 fi
5858
59- # First check HTTP endpoint is working
60- echo " Testing HTTP endpoint..."
61- result=$( curl -X ' POST' \
62- http://${ip_address} :${CHATHISTORY_PORT} /v1/chathistory/create \
63- -H ' accept: application/json' \
64- -H ' Content-Type: application/json' \
65- -d ' {
66- "data": {
67- "messages": [{"role": "user", "content": "test message"}],
68- "user": "test"
69- }
70- }' 2> /dev/null)
71-
72- if [[ ${# result} -lt 10 ]]; then
73- echo " HTTP endpoint test failed. Response: $result "
74- docker logs chathistory-mongo-server
75- exit 1
76- else
77- echo " HTTP endpoint test passed"
78- fi
79-
80- # Check if SSE endpoint is accessible
81- echo " Checking SSE endpoint..."
82- # Test both /sse and /sse/ to verify redirect behavior
83- sse_status_no_slash=$( curl -s -o /dev/null -w " %{http_code}" http://${ip_address} :${CHATHISTORY_PORT} /sse)
84- sse_status_with_slash=$( curl -s -o /dev/null -w " %{http_code}" http://${ip_address} :${CHATHISTORY_PORT} /sse/)
85- echo " SSE endpoint status without slash: $sse_status_no_slash (expected: 307 redirect)"
86- echo " SSE endpoint status with slash: $sse_status_with_slash (expected: 200 or 405)"
87-
88- if [[ " $sse_status_no_slash " != " 307" ]]; then
89- echo " Warning: SSE endpoint without trailing slash returned unexpected status: $sse_status_no_slash "
90- fi
91-
92- if [[ " $sse_status_with_slash " != " 200" && " $sse_status_with_slash " != " 405" ]]; then
93- echo " SSE endpoint not available (status: $sse_status_with_slash )"
94- docker logs chathistory-mongo-server
95- exit 1
96- fi
97-
98- python3 ${WORKPATH} /tests/utils/validate_svc_with_mcp.py $ip_address $CHATHISTORY_PORT " chathistory"
59+ # Run MCP validation
60+ python3 ${WORKPATH} /tests/chathistory/validate_mcp.py $ip_address $CHATHISTORY_PORT
9961 if [ $? -ne 0 ]; then
10062 docker logs mongodb
10163 docker logs chathistory-mongo-server
0 commit comments