From 469e970056ec1db22fde8cee1ab8139cb0158486 Mon Sep 17 00:00:00 2001 From: Jamil Date: Mon, 13 May 2024 07:10:04 -0700 Subject: [PATCH] ci: fix flaky dns-systemd test by waiting a second before running (#4962) It [appears](https://github.com/firezone/firezone/actions/runs/9052492759/job/24870262108?pr=4961) that occasionally the test runs before DNS sentinel is applied and/or Resources updated. --- scripts/tests/systemd/dns-systemd-resolved.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/tests/systemd/dns-systemd-resolved.sh b/scripts/tests/systemd/dns-systemd-resolved.sh index d0a1cf59d..75de9ac13 100755 --- a/scripts/tests/systemd/dns-systemd-resolved.sh +++ b/scripts/tests/systemd/dns-systemd-resolved.sh @@ -16,9 +16,9 @@ debug_exit() { } # Copy the Linux Client out of its container -docker compose exec client cat "$BINARY_NAME" > "$BINARY_NAME" || -docker compose exec client cat "firezone-linux-client" > "$BINARY_NAME" || -exit 1 +docker compose cp client:/bin/"$BINARY_NAME" "$BINARY_NAME" || + docker compose cp client:/bin/firezone-linux-client "$BINARY_NAME" || + exit 1 chmod u+x "$BINARY_NAME" sudo chown root:root "$BINARY_NAME" sudo mv "$BINARY_NAME" "/usr/bin/$BINARY_NAME" @@ -45,6 +45,10 @@ echo "# Start Firezone" resolvectl dns tun-firezone && exit 1 stat "/usr/bin/$BINARY_NAME" sudo systemctl start "$SERVICE_NAME" || debug_exit + +# Wait for connlib to set DNS sentinel and update Resources +sleep 1 + resolvectl dns tun-firezone resolvectl query "$HTTPBIN" || debug_exit