From 7c6c48e1337fec5982e98f330b048c93a92caed1 Mon Sep 17 00:00:00 2001 From: diginc Date: Thu, 7 Dec 2017 23:39:34 -0600 Subject: [PATCH] rest of loading tests fixed, undo heredoc tab2space --- bash_functions.sh | 14 +++++++------- test/test_start.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bash_functions.sh b/bash_functions.sh index f6e3f1e..4778113 100644 --- a/bash_functions.sh +++ b/bash_functions.sh @@ -174,11 +174,11 @@ setup_php_env_debian() { setup_php_env_alpine() { # Intentionally tabs, required by HEREDOC de-indentation (<<-) cat <<-EOF > "$PHP_ENV_CONFIG" - [www] - env[PATH] = ${PATH} - env[PHP_ERROR_LOG] = ${PHP_ERROR_LOG} - env[ServerIP] = ${ServerIP} - EOF + [www] + env[PATH] = ${PATH} + env[PHP_ERROR_LOG] = ${PHP_ERROR_LOG} + env[ServerIP] = ${ServerIP} + EOF if [ -z "$VIRTUAL_HOST" ] ; then VIRTUAL_HOST="$ServerIP" @@ -277,8 +277,8 @@ test_framework_stubbing() { echo ":::::: Tests are being ran - stub out ad list fetching and add a fake ad block" sed -i 's/^gravity_spinup$/#gravity_spinup # DISABLED FOR PYTEST/g' "$(which gravity.sh)" echo '123.123.123.123 testblock.pi-hole.local' > /var/www/html/fake.list - echo 'file:///var/www/html/fake.list' > /etc/pihole/adlists.txt - echo 'http://localhost/fake.list' >> /etc/pihole/adlists.txt + echo 'file:///var/www/html/fake.list' > /etc/pihole/adlists.list + echo 'http://localhost/fake.list' >> /etc/pihole/adlists.list fi } diff --git a/test/test_start.py b/test/test_start.py index 19c3bac..325b7d0 100644 --- a/test/test_start.py +++ b/test/test_start.py @@ -56,7 +56,7 @@ def test_html_index_requests_load_as_expected(RunningPiHole, Slow, addr, url): assert http_rc.rc == 0 assert int(http_rc.stdout) == 200 page_contents = RunningPiHole.run('cat /tmp/curled_file ').stdout - assert 'blocked' in page_contents + assert 'testblock.pi-hole.local' in page_contents @pytest.mark.parametrize('addr', [ 'testblock.pi-hole.local' ]) @pytest.mark.parametrize('url', [ '/index.js', '/any.js'] )