mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
ci: Use search_domain for one resource in CI test (#8393)
- Adds a `search_domain` of `httpbin.test` in seeds - Updates one of our DNS resources under CI test to use this
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
source "./scripts/tests/lib.sh"
|
||||
|
||||
HTTPBIN=dns.httpbin
|
||||
HTTPBIN=dns
|
||||
|
||||
function run_test() {
|
||||
echo "# Access httpbin by DNS"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
source "./scripts/tests/lib.sh"
|
||||
|
||||
RESOURCE1=dns.httpbin
|
||||
RESOURCE1=dns
|
||||
RESOURCE2=download.httpbin
|
||||
|
||||
echo "# Try to ping httpbin as DNS resource 1"
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
source "./scripts/tests/lib.sh"
|
||||
|
||||
HTTPBIN=dns.httpbin
|
||||
HTTPBIN=dns
|
||||
HTTPBIN_FQDN="$HTTPBIN.httpbin.search.test"
|
||||
|
||||
# Re-up the gateway since a local dev setup may run this back-to-back
|
||||
docker compose up -d gateway --no-build
|
||||
@@ -14,7 +15,7 @@ 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"
|
||||
gateway sh -c "curl --fail $HTTPBIN_FQDN/get"
|
||||
|
||||
echo "# Try to ping httpbin as a DNS resource"
|
||||
client_ping_resource "$HTTPBIN"
|
||||
|
||||
@@ -25,14 +25,15 @@ create_token_file
|
||||
|
||||
sudo cp "scripts/tests/systemd/$SERVICE_NAME.service" /usr/lib/systemd/system/
|
||||
|
||||
HTTPBIN=dns.httpbin
|
||||
HTTPBIN=dns
|
||||
HTTPBIN_FQDN="$HTTPBIN.httpbin.search.test"
|
||||
|
||||
# I'm assuming the docker iface name is relatively constant
|
||||
DOCKER_IFACE="docker0"
|
||||
FZ_IFACE="tun-firezone"
|
||||
|
||||
echo "# Make sure gateway can reach httpbin by DNS"
|
||||
gateway sh -c "curl --fail $HTTPBIN/get"
|
||||
gateway sh -c "curl --fail $HTTPBIN_FQDN/get"
|
||||
|
||||
echo "# Accessing a resource should fail before the client is up"
|
||||
# Force curl to try the Firezone interface. I can't block off the Docker interface yet
|
||||
|
||||
@@ -4,8 +4,11 @@ source "./scripts/tests/lib.sh"
|
||||
|
||||
client sh -c "apk add bind-tools" # The compat tests run using the production image which doesn't have `dig`.
|
||||
|
||||
echo "Resolving DNS resource over TCP"
|
||||
client sh -c "dig +tcp dns.httpbin"
|
||||
echo "Resolving DNS resource over TCP with search domain"
|
||||
client sh -c "dig +search +tcp dns"
|
||||
|
||||
echo "Resolving DNS resource over TCP with FQDN"
|
||||
client sh -c "dig +tcp download.httpbin"
|
||||
|
||||
echo "Resolving non-DNS resource over TCP"
|
||||
client sh -c "dig +tcp example.com"
|
||||
|
||||
Reference in New Issue
Block a user