add test and gitlab-ci

This commit is contained in:
2022-09-16 10:45:00 +07:00
parent b7409dcf7d
commit 2d3b767283
3 changed files with 83 additions and 0 deletions

11
test/validate_api.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
statusCode=$(curl -s -o /dev/null -w "%{http_code}" http://$PYTHON_API_HOSTNAME:5290/get_info)
if [ $statusCode == "200" ]; then
echo "service available"
exit 0
else
echo "service unavailable"
exit 1
fi