mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
ci: remove outdated integration tests (#6922)
Since we've added these tests, `connlib`'s test coverage has increased significantly to the point where we don't need all of them anymore. Especially pretty much everything in regards to relays is unnecessary to be tested using docker. These integration tests are sometimes flaky due to docker not starting or images failing to pull. Thus, having fewer of them is better because it increases CI reliability. Also, there are only so many jobs that GitHub will execute in parallel so having less jobs is better for that too. Resolves: #6451. --------- Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
This commit is contained in:
10
.github/workflows/_integration_tests.yml
vendored
10
.github/workflows/_integration_tests.yml
vendored
@@ -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
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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"
|
||||
@@ -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"
|
||||
@@ -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"
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user