Skip to content

Commit

Permalink
Revert "feat: test all api endpoints"
Browse files Browse the repository at this point in the history
This reverts commit 8d848cf.
  • Loading branch information
vesameskanen committed Feb 20, 2021
1 parent c85e76a commit 42feb0c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/scripts/build_and_push_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@ echo Building pelias-api
docker build --tag="$DOCKER_IMAGE_TAG_LONG" .
docker run --name $API -p 3100:8080 --rm $DOCKER_IMAGE_TAG_LONG &
sleep 20

HOST=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $API)

STAT1=$(curl -s -o /dev/null -w "%{http_code}" http://$HOST:8080/v1/search?text=helsinki)
STAT2=$(curl -s -o /dev/null -w "%{http_code}" http://$HOST:8080/v1/reverse?point.lat=60.17&point.lon=24.95)
STAT3=$(curl -s -o /dev/null -w "%{http_code}" http://$HOST:8080/v1/place?ids=openstreetmap:venue:node:2280742211)
STAT4=$(curl -s -o /dev/null -w "%{http_code}" http://$HOST:8080/v1/autocomplete?text=eduskunt)

STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://$HOST:8080/v1)
docker stop $API

if [ $STAT1 == 200 -a $STAT2 == 200 -a $STAT3 == 200 -a $STAT4 = 200 ]; then
if [ $STATUS_CODE = 200 ]; then
echo "Image runs OK"
else
echo "Could not launch pelias api image"
Expand Down

0 comments on commit 42feb0c

Please sign in to comment.