Slow down after setup to try to fix test

Signed-off-by: Adam Hill <adam@diginc.us>
This commit is contained in:
Adam Hill 2019-02-13 23:45:17 -06:00
parent ca4fe84df2
commit 9c7b02aba9
No known key found for this signature in database
GPG Key ID: 2193804FCA429855
1 changed files with 5 additions and 2 deletions

View File

@ -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`')