diff --git a/SearchQnA/tests/test_gmc_on_gaudi.sh b/SearchQnA/tests/test_gmc_on_gaudi.sh index 86a474d571..65f3c88356 100755 --- a/SearchQnA/tests/test_gmc_on_gaudi.sh +++ b/SearchQnA/tests/test_gmc_on_gaudi.sh @@ -36,10 +36,10 @@ function validate_searchqa() { export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name}) echo "$CLIENT_POD" accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='searchqa')].status.accessUrl}") - kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"What is the latest news? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log + kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"How many gold medals does USA win in olympics 2024? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log exit_code=$? if [ $exit_code -ne 0 ]; then - echo "chatqna failed, please check the logs in ${LOG_PATH}!" + echo "searchqna failed, please check the logs in ${LOG_PATH}!" exit 1 fi diff --git a/SearchQnA/tests/test_gmc_on_xeon.sh b/SearchQnA/tests/test_gmc_on_xeon.sh index 8e577a2d91..d049d60c70 100755 --- a/SearchQnA/tests/test_gmc_on_xeon.sh +++ b/SearchQnA/tests/test_gmc_on_xeon.sh @@ -36,10 +36,10 @@ function validate_searchqa() { export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name}) echo "$CLIENT_POD" accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='searchqa')].status.accessUrl}") - kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"What is the latest news? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log + kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"text":"How many gold medals does USA win in olympics 2024? Give me also the source link."}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_searchqa.log exit_code=$? if [ $exit_code -ne 0 ]; then - echo "chatqna failed, please check the logs in ${LOG_PATH}!" + echo "searchqna failed, please check the logs in ${LOG_PATH}!" exit 1 fi diff --git a/SearchQnA/tests/test_searchqna_on_gaudi.sh b/SearchQnA/tests/test_searchqna_on_gaudi.sh index 072ba688b9..877b436f7d 100644 --- a/SearchQnA/tests/test_searchqna_on_gaudi.sh +++ b/SearchQnA/tests/test_searchqna_on_gaudi.sh @@ -73,10 +73,14 @@ function start_services() { function validate_megaservice() { - result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "What is the latest news? Give me also the source link", "stream": "False"}' -H 'Content-Type: application/json') + result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "How many gold medals does USA win in olympics 2024? Give me also the source link.", "stream": "False"}' -H 'Content-Type: application/json') echo $result - if [[ $result == *"news"* ]]; then + if [[ $result == *"2024"* ]]; then + docker logs web-retriever-chroma-server > ${LOG_PATH}/web-retriever-chroma-server.log + docker logs searchqna-gaudi-backend-server > ${LOG_PATH}/searchqna-gaudi-backend-server.log + docker logs tei-embedding-gaudi-server > ${LOG_PATH}/tei-embedding-gaudi-server.log + docker logs embedding-tei-server > ${LOG_PATH}/embedding-tei-server.log echo "Result correct." else docker logs web-retriever-chroma-server > ${LOG_PATH}/web-retriever-chroma-server.log diff --git a/SearchQnA/tests/test_searchqna_on_xeon.sh b/SearchQnA/tests/test_searchqna_on_xeon.sh index 03255f4a12..200b6cf194 100644 --- a/SearchQnA/tests/test_searchqna_on_xeon.sh +++ b/SearchQnA/tests/test_searchqna_on_xeon.sh @@ -71,10 +71,12 @@ function start_services() { function validate_megaservice() { - result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "What is the latest news? Give me also the source link", "stream": "False"}' -H 'Content-Type: application/json') + result=$(http_proxy="" curl http://${ip_address}:3008/v1/searchqna -XPOST -d '{"messages": "How many gold medals does USA win in olympics 2024? Give me also the source link.", "stream": "False"}' -H 'Content-Type: application/json') echo $result - if [[ $result == *"news"* ]]; then + if [[ $result == *"2024"* ]]; then + docker logs web-retriever-chroma-server + docker logs searchqna-xeon-backend-server echo "Result correct." else docker logs web-retriever-chroma-server