diff --git a/.github/workflows/_integration_tests.yml b/.github/workflows/_integration_tests.yml index 2c97228ff..4e3f3cc3e 100644 --- a/.github/workflows/_integration_tests.yml +++ b/.github/workflows/_integration_tests.yml @@ -146,6 +146,17 @@ jobs: # Intended to mitigate sleep 3 + - name: Add 50ms simulated API latency + run: | + docker compose exec -T -u root api sh -c 'apk add --no-cache iproute2-tc' + docker compose exec -T -u root api sh -c 'tc qdisc add dev eth0 root netem delay 50ms' + + - name: Add 10ms simulated gateway latency + run: | + # compatibility test images won't have the `tc` command + docker compose exec -T gateway sh -c 'apk add --no-cache iproute2-tc' + docker compose exec -T gateway sh -c 'tc qdisc add dev eth0 root netem delay 10ms' + - run: ./scripts/tests/${{ matrix.test.name }}.sh - name: Ensure Client emitted no warnings diff --git a/docker-compose.yml b/docker-compose.yml index 3cfc7e3c9..3c710f3c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -175,6 +175,8 @@ services: FEATURE_IDP_SYNC_ENABLED: "true" FEATURE_REST_API_ENABLED: "true" FEATURE_INTERNET_RESOURCE_ENABLED: "true" + cap_add: + - NET_ADMIN # Needed to run `tc` commands to add simulated delay depends_on: vault: condition: "service_healthy"