From f950671a1ca41bd6f59dd6f6eade5c9239e9a85c Mon Sep 17 00:00:00 2001 From: Martin Buchleitner Date: Wed, 8 May 2019 08:31:42 +0200 Subject: [PATCH] missed test update Signed-off-by: Martin Buchleitner --- bash_functions.sh | 1 - test/test_bash_functions.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bash_functions.sh b/bash_functions.sh index fe3cfef..90935fc 100644 --- a/bash_functions.sh +++ b/bash_functions.sh @@ -116,7 +116,6 @@ setup_dnsmasq_dns() { dnsType='custom' fi; - # TODO With the addition of this to /start.sh this needs a refactor if [ ! -f $CONFIG_DIR/.piholeFirstBoot ] ; then local setupDNS1="$(grep 'PIHOLE_DNS_1' ${setupVars})" local setupDNS2="$(grep 'PIHOLE_DNS_2' ${setupVars})" diff --git a/test/test_bash_functions.py b/test/test_bash_functions.py index 854c506..8e1bdfa 100644 --- a/test/test_bash_functions.py +++ b/test/test_bash_functions.py @@ -66,7 +66,7 @@ def test_bad_input_to_WEB_PORT(Docker, test_args, expected_error): def test_override_default_servers_with_DNS_EnvVars(Docker, Slow, args_env, expected_stdout, dns1, dns2): ''' on first boot when DNS vars are NOT set explain default google DNS settings are used or when DNS vars are set override the pihole DNS settings ''' - assert Docker.run('test -f /.piholeFirstBoot').rc == 0 + assert Docker.run('test -f $CONFIG_DIR/.piholeFirstBoot').rc == 0 function = Docker.run('. /bash_functions.sh ; eval `grep "^setup_dnsmasq " /start.sh`') assert expected_stdout in function.stdout expected_servers = 'server={}\n'.format(dns1) if dns2 == None else 'server={}\nserver={}\n'.format(dns1, dns2) @@ -90,7 +90,7 @@ def test_DNS_Envs_are_secondary_to_setupvars(Docker, Slow, args_env, expected_st ''' on second boot when DNS vars are set just use pihole DNS settings or when DNS vars and FORCE_DNS var are set override the pihole DNS settings ''' # Given we are not booting for the first time - assert Docker.run('rm /.piholeFirstBoot').rc == 0 + assert Docker.run('rm $CONFIG_DIR/.piholeFirstBoot').rc == 0 # and a user already has custom pihole dns variables in setup vars dns_count = 1