From 41fc498166b681f13b621eaece9a5f53d33a135c Mon Sep 17 00:00:00 2001 From: Adam Hill Date: Wed, 13 Feb 2019 23:45:17 -0600 Subject: [PATCH] Slow down after setup to try to fix test Signed-off-by: Adam Hill Signed-off-by: Martin Buchleitner --- test/test_bash_functions.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test_bash_functions.py b/test/test_bash_functions.py index fdd613b..ae5359d 100644 --- a/test/test_bash_functions.py +++ b/test/test_bash_functions.py @@ -89,12 +89,15 @@ def test_DNS_Envs_are_secondary_to_setupvars(Docker, Slow, args_env, expected_st assert Docker.run('rm /.piholeFirstBoot').rc == 0 # and a user already has custom pihole dns variables in setup vars + dns_count = 1 setupVars = '/etc/pihole/setupVars.conf' - Docker.run('sed -i "/^PIHOLE_DNS_1/ d" {}'.format(dns1, setupVars)) - Docker.run('sed -i "/^PIHOLE_DNS_2/ d" {}'.format(dns2, setupVars)) + Docker.run('sed -i "/^PIHOLE_DNS/ d" {}'.format(setupVars)) Docker.run('echo "PIHOLE_DNS_1={}" >> {}'.format(dns1, setupVars)) if dns2: + dns_count = dns_count + 1 Docker.run('echo "PIHOLE_DNS_2={}" >> {}'.format(dns2, setupVars)) + confirm_setup = 'grep -c "^PIHOLE_DNS_" {}'.format(setupVars) + Slow(lambda: int(Docker.run(confirm_setup).stdout) == dns_count) # When we run setup dnsmasq during startup of the container function = Docker.run('. /bash_functions.sh ; eval `grep "^setup_dnsmasq " /start.sh`')