From 7159ffb34ba0e598e53edd821b5874b95484e9c7 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 25 Jun 2024 16:07:13 +1000 Subject: [PATCH] ci: timeout `curl` requests after 30s (#5537) Currently, we rely on curl's default timeout when connecting to a resource. This is problematic because the `direct-dns` and `relayed-dns` integration tests check that a certain resource _isn't_ accessible and this test currently waits for 5 minutes to assert that. We can shorten this and thus every CI by passing a `--connect-timeout` to `curl`. See https://github.com/firezone/firezone/actions/runs/9656570163/job/26634409843#step:6:445 for an example CI run on `main`. --- scripts/tests/lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tests/lib.sh b/scripts/tests/lib.sh index e1399e80f..3dbd10bff 100755 --- a/scripts/tests/lib.sh +++ b/scripts/tests/lib.sh @@ -54,7 +54,7 @@ function remove_iptables_drop_rules() { } function client_curl_resource() { - client curl --fail "$1" >/dev/null + client curl --connect-timeout 30 --fail "$1" >/dev/null } function client_ping_resource() {