diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index a98eb3aa..16b72230 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -809,7 +809,7 @@ installPiholeWeb() { if [ -f "/var/www/html/pihole/blockingpage.css" ]; then echo "::: Existing blockingpage.css detected, not overwriting" else - echo -n "::: index.css missing, replacing... " + echo -n "::: blockingpage.css missing, replacing... " cp /etc/.pihole/advanced/blockingpage.css /var/www/html/pihole echo " done!" fi diff --git a/test/test_automated_install.py b/test/test_automated_install.py index 211364ed..29c62f45 100644 --- a/test/test_automated_install.py +++ b/test/test_automated_install.py @@ -167,6 +167,20 @@ def test_configureFirewall_IPTables_enabled_not_exist_no_errors(Pihole): assert 'iptables -I INPUT 1 -p tcp -m tcp --dport 53 -j ACCEPT' in firewall_calls assert 'iptables -I INPUT 1 -p udp -m udp --dport 53 -j ACCEPT' in firewall_calls +def test_installPiholeWeb_fresh_install_no_errors(Pihole): + ''' confirms all web page assets from Core repo are installed on a fresh build ''' + installWeb = Pihole.run(''' + source /opt/pihole/basic-install.sh + installPiholeWeb + ''') + assert 'Installing pihole custom index page...' in installWeb.stdout + assert 'No default index.lighttpd.html file found... not backing up' in installWeb.stdout + web_directory = Pihole.run('ls -r /var/www/html/pihole').stdout + assert 'index.php' in web_directory + assert 'index.js' in web_directory + assert 'blockingpage.css' in web_directory + + # Helper functions def mock_command(script, args, container): ''' Allows for setup of commands we don't really want to have to run for real in unit tests '''