Commit 57f5a099 authored by Alberto Bertogli's avatar Alberto Bertogli

test: Replace dnsmasq with minidns

This commit replaces test/t-14-tls_tracking usage of dnsmasq (an
external test dependency) with our new minidns.
parent a0ae5fb4
......@@ -25,8 +25,7 @@ RUN apt-get install -y -q python3 msmtp
# Install the optional packages for the integration tests.
RUN apt-get install -y -q \
gettext-base dovecot-imapd \
exim4-daemon-light \
dnsmasq
exim4-daemon-light
# Prepare exim.
RUN mkdir -p test/t-02-exim/.exim4 \
......
# Configuration for dnsmasq, for testing purposes.
interface=lo
port=9053
no-resolv
no-poll
no-hosts
log-queries
# Note we need both ipv4 and ipv6 A record because some test environments may
# not support one or the other.
# srv-a zone
address=/srv-a/::1
address=/srv-a/127.0.0.1
mx-host=srv-a,srv-a,10
txt-record=srv-a,"v=spf1 a"
# srv-b zone
address=/srv-b/::1
address=/srv-b/127.0.0.1
mx-host=srv-b,srv-b,10
txt-record=srv-b,"v=spf1 a"
......@@ -7,11 +7,6 @@ set -e
init
if ! dnsmasq --version > /dev/null; then
skip "dnsmasq binary is not functional"
exit 0
fi
# To fake SPF we need to override the resolver, which is only supported in Go
# >= 1.8, so this test depends on that version.
# TODO: remove this once we only support go >= 1.8.
......@@ -25,11 +20,8 @@ fi
# Build with the DNS override, so we can fake DNS records.
export GOTAGS="dnsoverride"
# Launch dnsmasq in the background using our configuration.
# We run with -d as it takes care of a lot of options (log file, pid file,
# etc.) for our use case.
# It listens on localhost:9053 as configuration.
dnsmasq --conf-file=dnsmasq.conf -d >> .dnsmasq.log 2>&1 &
# Launch minidns in the background using our configuration.
minidns --addr=":9053" -zones=zones >> .minidns.log 2>&1 &
# Two chasquid servers:
......
# srv-a zone
srv-a A 127.0.0.1
srv-a AAAA ::1
srv-a MX srv-a
srv-a TXT v=spf1 a
# srv-b zone
srv-b A 127.0.0.1
srv-b AAAA ::1
srv-b MX srv-b
srv-b TXT v=spf1 a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment