Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! remote_address: step 4 e2e …
Browse files Browse the repository at this point in the history
…integration test
  • Loading branch information
eguzki committed Oct 17, 2024
1 parent dbcfe9a commit b2db161
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,9 @@ jobs:
with:
command: build
args: --target wasm32-unknown-unknown
- name: Run docker-compose
uses: hoverkraft-tech/compose-action@v2.0.1
with:
compose-file: "./e2e/remote-address/docker-compose.yaml"
up-flags: "--detach"
- name: Run docker compose
run: |
docker compose -f ./e2e/remote-address/docker-compose.yaml run start_services
- name: Execute tests in the running services
run: |
make -f ./e2e/remote-address/Makefile test
5 changes: 2 additions & 3 deletions e2e/remote-address/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ WORKDIR := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
DOCKER ?= $(shell which docker 2> /dev/null || echo "docker")

run:
$(DOCKER) compose -f docker-compose.yaml up --detach
$(DOCKER) compose -f docker-compose.yaml run start_services

test:
# curl --silent --output /dev/null --fail --resolve test.example.com:18000:127.0.0.1 -H "X-Forwarded-For: 40.0.0.1" "http://test.example.com:18000"
curl --fail --resolve test.example.com:18000:127.0.0.1 -H "X-Forwarded-For: 40.0.0.1" "http://test.example.com:18000"
curl --silent --output /dev/null --fail --resolve test.example.com:18000:127.0.0.1 -H "X-Forwarded-For: 40.0.0.1" "http://test.example.com:18000"
curl --silent --output /dev/null --fail --resolve test.example.com:18000:127.0.0.1 -H "X-Forwarded-For: 50.0.0.1" "http://test.example.com:18000"
$(eval TMP := $(shell mktemp -d))
curl --silent --output $(TMP)/counters.json --fail "http://127.0.0.1:18080/counters/ratelimit-source"
Expand Down
13 changes: 13 additions & 0 deletions e2e/remote-address/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,16 @@ services:
PORT: 3000
expose:
- "3000"
start_services:
image: alpine
depends_on:
- envoy
command: >
/bin/sh -c "
while ! nc -z envoy 80;
do
echo sleeping;
sleep 1;
done;
echo Connected!
"

0 comments on commit b2db161

Please sign in to comment.