Skip to content

Commit

Permalink
chore: tries different envoy versions. (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchavezs authored Oct 4, 2022
1 parent 3d59d6e commit b44b50c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ env:
GO_VERSION: 1.18
TINYGO_VERSION: 0.25.0
WABT_VERSION: 1.0.29
# The SHA of the envoy version comes from https://github.com/istio/proxy/blob/master/WORKSPACE#L42
# Here we aim to support:
# - istio 1.5.0 envoy version
# - istio 1.5.1 envoy version
# - latest envoy master
ENVOY_IMAGES: >
envoyproxy/envoy:v1.23-latest
envoyproxy/envoy-dev:1c86bac121ae73cefcba64ec0a863707b6cb8158
envoyproxy/envoy-dev:latest
jobs:
build:
Expand Down Expand Up @@ -61,7 +70,11 @@ jobs:
run: go run mage.go coverage

- name: Run e2e tests
run: go run mage.go e2e
shell: bash
run: >
for image in $ENVOY_IMAGES; do
ENVOY_IMAGE=$image go run mage.go e2e
done
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand Down
2 changes: 1 addition & 1 deletion e2e/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
envoy:
image: envoyproxy/envoy:v1.23-latest
image: ${ENVOY_IMAGE:-envoyproxy/envoy:v1.23-latest}
command:
- -c
- /conf/envoy-config.yaml
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ while [[ "$status_code" -eq "000" ]]; do
status_code=$(curl --write-out "%{http_code}" --silent --output /dev/null $health_url)
sleep 1
echo -ne "[Wait] Waiting for response from $health_url. Timeout: ${max_retries}s \r"
((max_retries-=1))
max_retries=$((max_retries-1))
if [[ "$max_retries" -eq 0 ]] ; then
echo "[Fail] Timeout waiting for response from $health_url, make sure the server is running."
exit 1
Expand All @@ -29,7 +29,7 @@ done
echo -e "\n[Ok] Got status code $status_code, expected 200. Ready to start."

# Testing envoy container reachability with an unfiltered request
((step+=1))
step=$((step+1))
echo "[$step/$total_steps] Testing true negative request"
status_code=$(curl --write-out "%{http_code}" --silent --output /dev/null $unfiltered_url)
if [[ "$status_code" -ne 200 ]] ; then
Expand All @@ -39,7 +39,7 @@ fi
echo "[Ok] Got status code $status_code, expected 200"

# Testing filtered request
((step+=1))
step=$((step+1))
echo "[$step/$total_steps] Testing true positive request"
status_code=$(curl --write-out "%{http_code}" --silent --output /dev/null $filtered_url)
if [[ "$status_code" -ne 403 ]] ; then
Expand Down

0 comments on commit b44b50c

Please sign in to comment.