diff --git a/.github/workflows/_integration_tests.yml b/.github/workflows/_integration_tests.yml index a4fafbcc1..702b0d078 100644 --- a/.github/workflows/_integration_tests.yml +++ b/.github/workflows/_integration_tests.yml @@ -97,26 +97,16 @@ jobs: fail-fast: false matrix: test: - - name: direct-curl-relay-restart - name: direct-curl-api-down - - name: direct-curl-api-relay-down - name: direct-curl-api-restart - name: direct-dns-api-down - - name: direct-dns-relay-down - name: direct-dns-two-resources - name: direct-dns - name: direct-download-roaming-network # Too noisy can cause flaky tests due to the amount of data rust_log: debug - - name: dns-failsafe # Uses the default DNS control method - name: dns-nm - name: relay-graceful-shutdown - - name: relayed-curl-api-down - - name: relayed-curl-api-restart - - name: relayed-curl-relay-restart - - name: relayed-dns-api-down - - name: relayed-dns-relay-restart - - name: relayed-dns - name: systemd/dns-systemd-resolved steps: - uses: actions/checkout@v4 diff --git a/scripts/tests/direct-curl-api-relay-down.sh b/scripts/tests/direct-curl-api-relay-down.sh deleted file mode 100755 index 47709acb7..000000000 --- a/scripts/tests/direct-curl-api-relay-down.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -source "./scripts/tests/lib.sh" - -client_curl_resource "172.20.0.100/get" - -docker compose stop api relay-1 relay-2 # Stop portal & relays - -client_curl_resource "172.20.0.100/get" diff --git a/scripts/tests/direct-curl-relay-restart.sh b/scripts/tests/direct-curl-relay-restart.sh deleted file mode 100755 index 2d92f8666..000000000 --- a/scripts/tests/direct-curl-relay-restart.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -source "./scripts/tests/lib.sh" -HTTPBIN=http://dns.httpbin - -docker compose stop relay-2 - -echo "# Load page" -client_curl_resource $HTTPBIN/get - -echo "# Simulate rolling deployment of relays" -docker compose start relay-2 -docker compose kill relay-1 --signal SIGTERM - -sleep 1 - -echo "# Load page again" -client_curl_resource $HTTPBIN/get diff --git a/scripts/tests/direct-dns-relay-down.sh b/scripts/tests/direct-dns-relay-down.sh deleted file mode 100755 index b3125bdc7..000000000 --- a/scripts/tests/direct-dns-relay-down.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -source "./scripts/tests/lib.sh" - -HTTPBIN=dns.httpbin - -function run_test() { - echo "# Access httpbin by DNS" - client_curl_resource "$HTTPBIN/get" - - echo "# Make sure it's going through the tunnel" - client_nslookup "$HTTPBIN" | grep "100\\.96\\.0\\." -} - -run_test - -docker compose stop relay-1 relay-2 - -run_test diff --git a/scripts/tests/dns-failsafe.sh b/scripts/tests/dns-failsafe.sh deleted file mode 100755 index 77c1569fd..000000000 --- a/scripts/tests/dns-failsafe.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# If we set the DNS control to `systemd-resolved` but that's not available, -# the Client should bail out with an error message and non-zero exit code. - -set -euox pipefail - -source "./scripts/tests/lib.sh" - -# Re-up the gateway since a local dev setup may run this back-to-back -docker compose up -d gateway --no-build - -echo "# make sure resolv.conf was not changed" -client sh -c "cat /etc/resolv.conf" - -echo "# Make sure gateway can reach httpbin by DNS" -gateway sh -c "curl --fail dns.httpbin/get" - -echo "# Access httpbin by IP" -client_curl_resource "172.20.0.100/get" - -echo "# Stop the gateway and make sure the resource is inaccessible" -docker compose stop gateway -client_curl_resource "172.20.0.100/get" && exit 1 - -# Needed so that the previous failure doesn't bail out of the whole script -exit 0 diff --git a/scripts/tests/relayed-curl-api-down.sh b/scripts/tests/relayed-curl-api-down.sh deleted file mode 100755 index d1cdcace1..000000000 --- a/scripts/tests/relayed-curl-api-down.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -source "./scripts/tests/lib.sh" - -install_iptables_drop_rules - -client_curl_resource "172.20.0.100/get" - -docker compose stop api # Stop portal - -client_curl_resource "172.20.0.100/get" diff --git a/scripts/tests/relayed-curl-api-restart.sh b/scripts/tests/relayed-curl-api-restart.sh deleted file mode 100755 index 485446c12..000000000 --- a/scripts/tests/relayed-curl-api-restart.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -source "./scripts/tests/lib.sh" - -install_iptables_drop_rules - -docker compose restart api # Restart portal - -client_curl_resource "172.20.0.100/get" - -docker compose restart api # Restart again - -client_curl_resource "172.20.0.100/get" diff --git a/scripts/tests/relayed-curl-relay-restart.sh b/scripts/tests/relayed-curl-relay-restart.sh deleted file mode 100755 index 7bd3eba4a..000000000 --- a/scripts/tests/relayed-curl-relay-restart.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -source "./scripts/tests/lib.sh" - -install_iptables_drop_rules - -client_curl_resource "172.20.0.100/get" - -# Restart relays with new IPs -RELAY_1_PUBLIC_IP4_ADDR="172.28.0.102" docker compose up -d relay-1 -RELAY_2_PUBLIC_IP4_ADDR="172.28.0.202" docker compose up -d relay-2 - -sleep 1 - -client_curl_resource "172.20.0.100/get" diff --git a/scripts/tests/relayed-dns-api-down.sh b/scripts/tests/relayed-dns-api-down.sh deleted file mode 100755 index 08f8cded3..000000000 --- a/scripts/tests/relayed-dns-api-down.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -source "./scripts/tests/lib.sh" - -HTTPBIN=dns.httpbin - -function run_test() { - echo "# Access httpbin by DNS" - client_curl_resource "$HTTPBIN/get" - - echo "# Make sure it's going through the tunnel" - client_nslookup "$HTTPBIN" | grep "100\\.96\\.0\\." -} - -install_iptables_drop_rules - -run_test - -docker compose stop api - -run_test diff --git a/scripts/tests/relayed-dns-relay-restart.sh b/scripts/tests/relayed-dns-relay-restart.sh deleted file mode 100755 index e48807dc0..000000000 --- a/scripts/tests/relayed-dns-relay-restart.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -source "./scripts/tests/lib.sh" - -HTTPBIN=dns.httpbin - -function run_test() { - echo "# Access httpbin by DNS" - client_curl_resource "$HTTPBIN/get" - - echo "# Make sure it's going through the tunnel" - client_nslookup "$HTTPBIN" | grep "100\\.96\\.0\\." -} - -install_iptables_drop_rules - -run_test - -# Restart relays with new IP -RELAY_1_PUBLIC_IP4_ADDR="172.28.0.102" docker compose up -d relay-1 -RELAY_2_PUBLIC_IP4_ADDR="172.28.0.202" docker compose up -d relay-2 - -run_test diff --git a/scripts/tests/relayed-dns.sh b/scripts/tests/relayed-dns.sh deleted file mode 100755 index 738607155..000000000 --- a/scripts/tests/relayed-dns.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -# The integration tests call this to test Linux DNS control, using the `/etc/resolv.conf` -# method which only works well inside Alpine Docker containers. - -source "./scripts/tests/lib.sh" - -HTTPBIN=dns.httpbin - -install_iptables_drop_rules - -# Re-up the gateway since a local dev setup may run this back-to-back -docker compose up -d gateway --no-build - -echo "# check original resolv.conf" -client sh -c "cat /etc/resolv.conf.before-firezone" - -echo "# Make sure gateway can reach httpbin by DNS" -gateway sh -c "curl --fail $HTTPBIN/get" - -echo "# Try to ping httpbin as a DNS resource" -client_ping_resource "$HTTPBIN" - -echo "# Access httpbin by DNS" -client_curl_resource "$HTTPBIN/get" - -echo "# Make sure it's going through the tunnel" -client_nslookup "$HTTPBIN" | grep "100\\.96\\.0\\." - -echo "# Make sure a non-resource doesn't go through the tunnel" -(client_nslookup "github.com" | grep "100\\.96.\\0\\.") && exit 1 - -echo "# Stop the gateway and make sure the resource is inaccessible" -docker compose stop gateway -client_curl_resource "$HTTPBIN/get" && exit 1 - -exit 0