git » chasquid » commit 0d3bbe1

test: In the docker entrypoint, wait for minidns to come up

author Alberto Bertogli
2019-08-04 03:52:18 UTC
committer Alberto Bertogli
2019-08-04 03:55:07 UTC
parent 51020076879477a428e319d12d03a9966e808065

test: In the docker entrypoint, wait for minidns to come up

The tests might start running and attempting to do DNS resolutions
before minidns has come up, which can cause false positives and flaky
tests.

This patch makes the entrypoint wait until minidns has come up, to fix
the problem.

test/util/docker_entrypoint.sh +3 -0

diff --git a/test/util/docker_entrypoint.sh b/test/util/docker_entrypoint.sh
index 578d895..822267f 100755
--- a/test/util/docker_entrypoint.sh
+++ b/test/util/docker_entrypoint.sh
@@ -37,6 +37,9 @@ start-stop-daemon --start --background \
 echo "nameserver 127.0.0.1" > /etc/resolv.conf
 echo "nameserver ::1" >> /etc/resolv.conf
 
+# Wait until the minidns resolver comes up.
+wait_until_ready 53
+
 # Launch arguments, which come from docker CMD, as "chasquid" user.
 # Running tests as root makes some integration tests more difficult, as for
 # example Exim has hard-coded protections against running as root.