Skip to content

Commit

Permalink
Add test case for command output in docker
Browse files Browse the repository at this point in the history
Signed-off-by: imjoey <[email protected]>
  • Loading branch information
imjoey committed Jan 29, 2021
1 parent 00fa584 commit 9d4a35c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/test/shell/docker_deploy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@

set -ex

# Version output
verline=$(docker logs docker-deploy_managerapi_1 | grep -E "^Version : [A-Za-z0-9\-\_\.]+")
if [ -z "$verline" ];then
echo "no Version output"
exit 1
fi

# web page
curl http://127.0.0.1:9000
code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9000)
Expand All @@ -32,6 +39,7 @@ resp=$(curl http://127.0.0.1:9000/apisix/admin/user/login -X POST -d '{"username
token=$(echo "${resp}" | sed 's/{/\n/g' | sed 's/,/\n/g' | grep "token" | sed 's/:/\n/g' | sed '1d' | sed 's/}//g' | sed 's/"//g')
if [ -z "${token}" ]; then
echo "login failed"
exit 1
fi

# plugin orchestration
Expand Down

0 comments on commit 9d4a35c

Please sign in to comment.