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:
Thomas Eizinger
2024-10-09 03:39:18 +11:00
committed by GitHub
parent 928fab3878
commit 650e31c784
11 changed files with 0 additions and 203 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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