1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 14:58:08 +00:00

Fix test_installPiholeWeb_fresh_install_no_errors and test_installPihole_fresh_install_readableBlockpage

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2022-07-26 19:45:03 +01:00
parent 5d5a85b7b6
commit 5816f495f4
No known key found for this signature in database
GPG Key ID: 872950F3ECF2B173

View File

@ -116,9 +116,9 @@ def test_installPiholeWeb_fresh_install_no_errors(host):
source /opt/pihole/basic-install.sh source /opt/pihole/basic-install.sh
installPiholeWeb installPiholeWeb
''') ''')
expected_stdout = info_box + ' Installing blocking page...' expected_stdout = info_box + ' Installing 404 page...'
assert expected_stdout in installWeb.stdout assert expected_stdout in installWeb.stdout
expected_stdout = tick_box + (' Creating directory for blocking page, ' expected_stdout = tick_box + (' Creating directory for 404 page, '
'and copying files') 'and copying files')
assert expected_stdout in installWeb.stdout assert expected_stdout in installWeb.stdout
expected_stdout = info_box + ' Backing up index.lighttpd.html' expected_stdout = info_box + ' Backing up index.lighttpd.html'
@ -130,7 +130,6 @@ def test_installPiholeWeb_fresh_install_no_errors(host):
assert expected_stdout in installWeb.stdout assert expected_stdout in installWeb.stdout
web_directory = host.run('ls -r /var/www/html/pihole').stdout web_directory = host.run('ls -r /var/www/html/pihole').stdout
assert 'index.php' in web_directory assert 'index.php' in web_directory
assert 'blockingpage.css' in web_directory
def get_directories_recursive(host, directory): def get_directories_recursive(host, directory):
@ -605,10 +604,6 @@ def test_installPihole_fresh_install_readableBlockpage(host, test_webpage):
'r', webroot + '/pihole/index.php', webuser) 'r', webroot + '/pihole/index.php', webuser)
actual_rc = host.run(check_index).rc actual_rc = host.run(check_index).rc
assert exit_status_success == actual_rc assert exit_status_success == actual_rc
check_blockpage = test_cmd.format(
'r', webroot + '/pihole/blockingpage.css', webuser)
actual_rc = host.run(check_blockpage).rc
assert exit_status_success == actual_rc
if test_webpage is True: if test_webpage is True:
# check webpage for unreadable files # check webpage for unreadable files
noPHPfopen = re.compile( noPHPfopen = re.compile(