diff --git a/DocIndexRetriever/tests/test_compose_on_xeon.sh b/DocIndexRetriever/tests/test_compose_on_xeon.sh index a106301598..72dc61b706 100644 --- a/DocIndexRetriever/tests/test_compose_on_xeon.sh +++ b/DocIndexRetriever/tests/test_compose_on_xeon.sh @@ -88,28 +88,7 @@ function validate_megaservice() { local CONTENT=$(http_proxy="" curl http://${ip_address}:8889/v1/retrievaltool -X POST -H "Content-Type: application/json" -d '{ "text": "Explain the OPEA project?" }') - # local CONTENT=$(python test.py --host_ip ${ip_address} --request_type text) - local EXIT_CODE=$(validate "$CONTENT" "OPEA" "doc-index-retriever-service-xeon") - echo "$EXIT_CODE" - local EXIT_CODE="${EXIT_CODE:0-1}" - echo "return value is $EXIT_CODE" - if [ "$EXIT_CODE" == "1" ]; then - echo "=============Embedding container log==================" - docker logs embedding-tei-server | tee -a ${LOG_PATH}/doc-index-retriever-service-xeon.log - echo "=============Retriever container log==================" - docker logs retriever-redis-server | tee -a ${LOG_PATH}/doc-index-retriever-service-xeon.log - echo "=============TEI Reranking log==================" - docker logs tei-reranking-server | tee -a ${LOG_PATH}/doc-index-retriever-service-xeon.log - echo "=============Reranking container log==================" - docker logs reranking-tei-xeon-server | tee -a ${LOG_PATH}/doc-index-retriever-service-xeon.log - echo "=============Doc-index-retriever container log==================" - docker logs doc-index-retriever-server | tee -a ${LOG_PATH}/doc-index-retriever-service-xeon.log - exit 1 - fi - echo "================Testing retriever service: ChatCompletion Request================" - cd $WORKPATH/tests - local CONTENT=$(python test.py --host_ip ${ip_address} --request_type chat_completion) local EXIT_CODE=$(validate "$CONTENT" "OPEA" "doc-index-retriever-service-xeon") echo "$EXIT_CODE" local EXIT_CODE="${EXIT_CODE:0-1}" @@ -127,6 +106,7 @@ function validate_megaservice() { docker logs doc-index-retriever-server | tee -a ${LOG_PATH}/doc-index-retriever-service-xeon.log exit 1 fi + } function stop_docker() { diff --git a/DocIndexRetriever/tests/test_compose_without_rerank_on_xeon.sh b/DocIndexRetriever/tests/test_compose_without_rerank_on_xeon.sh index 0298a8a55b..a9ab2db799 100644 --- a/DocIndexRetriever/tests/test_compose_without_rerank_on_xeon.sh +++ b/DocIndexRetriever/tests/test_compose_without_rerank_on_xeon.sh @@ -83,24 +83,7 @@ function validate_megaservice() { local CONTENT=$(http_proxy="" curl http://${ip_address}:8889/v1/retrievaltool -X POST -H "Content-Type: application/json" -d '{ "text": "Explain the OPEA project?" }') - # local CONTENT=$(python test.py --host_ip ${ip_address} --request_type text) - local EXIT_CODE=$(validate "$CONTENT" "OPEA" "doc-index-retriever-service-xeon") - echo "$EXIT_CODE" - local EXIT_CODE="${EXIT_CODE:0-1}" - echo "return value is $EXIT_CODE" - if [ "$EXIT_CODE" == "1" ]; then - echo "=============Embedding container log==================" - docker logs embedding-tei-server | tee -a ${LOG_PATH}/doc-index-retriever-service-xeon.log - echo "=============Retriever container log==================" - docker logs retriever-redis-server | tee -a ${LOG_PATH}/doc-index-retriever-service-xeon.log - echo "=============Doc-index-retriever container log==================" - docker logs doc-index-retriever-server | tee -a ${LOG_PATH}/doc-index-retriever-service-xeon.log - exit 1 - fi - echo "================Testing retriever service: ChatCompletion Request================" - cd $WORKPATH/tests - local CONTENT=$(python test.py --host_ip ${ip_address} --request_type chat_completion) local EXIT_CODE=$(validate "$CONTENT" "OPEA" "doc-index-retriever-service-xeon") echo "$EXIT_CODE" local EXIT_CODE="${EXIT_CODE:0-1}" @@ -114,6 +97,7 @@ function validate_megaservice() { docker logs doc-index-retriever-server | tee -a ${LOG_PATH}/doc-index-retriever-service-xeon.log exit 1 fi + } function stop_docker() {