mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
chore(ci): Add 50ms simulated API latency (#10132)
In the real world, it's entirely possible that the latency between clients, gateways, and relays is much lower than the latency to the API nodes. This added latency will test that we can handle such cases reliably. --------- Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
This commit is contained in:
11
.github/workflows/_integration_tests.yml
vendored
11
.github/workflows/_integration_tests.yml
vendored
@@ -146,6 +146,17 @@ jobs:
|
||||
# Intended to mitigate <https://github.com/firezone/firezone/issues/5830>
|
||||
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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user