Skip to content

Commit

Permalink
Add working e2e test with internal certs
Browse files Browse the repository at this point in the history
  • Loading branch information
thebalaa committed Feb 26, 2024
1 parent c66e711 commit ac0132a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ci/create-link-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,18 @@ cat network.yaml >> test-link.yaml
sed -i 's/^\(\s*GATEWAY_ENDPOINT:\).*/\1 app-example-com:18521/' test-link.yaml
docker compose -f test-link.yaml up -d
docker compose -f test-link.yaml exec link ping 10.0.0.1 -c 2
# assert http response code was 200
# asserts basic auth is working with user: admin, password: admin

if ! docker compose exec gateway curl -k -H "Authorization: Basic YWRtaW46YWRtaW4=" --resolve app.example.com:443:127.0.0.1 https://app.example.com -I |grep "HTTP/2 200"; then
FAILED="true"
fi
docker compose -f test-link.yaml down
docker rm -f app-example-com
rm test-link.yaml
docker compose down

# if FAILED is true return 1 else 0
if [ ! -z ${FAILED+x} ]; then
exit 1
fi

0 comments on commit ac0132a

Please sign in to comment.