mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Fresh install web page directory tests
This commit is contained in:
parent
cc7c48237c
commit
5b43f13935
@ -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
|
||||
|
@ -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 '''
|
||||
|
Loading…
Reference in New Issue
Block a user