diff --git a/test/test_automated_install.py b/test/test_automated_install.py index 7f1a86a1..3f0bd969 100644 --- a/test/test_automated_install.py +++ b/test/test_automated_install.py @@ -189,107 +189,6 @@ def test_installPiholeWeb_fresh_install_no_errors(Pihole): assert 'index.js' in web_directory assert 'blockingpage.css' in web_directory -def test_installPiholeWeb_empty_directory_no_errors(Pihole): - ''' confirms all web page assets from Core repo are installed in an emtpy directory ''' - installWeb = Pihole.run(''' - source /opt/pihole/basic-install.sh - mkdir -p /var/www/html/pihole - installPiholeWeb - ''') - assert info_box + ' Installing blocking page...' in installWeb.stdout - assert info_box + ' Installing index.php' in installWeb.stdout - assert info_box + ' Installing index.js' in installWeb.stdout - assert info_box + ' Installing blockingpage.css' in installWeb.stdout - assert 'No default index.lighttpd.html file found... not backing up' not in installWeb.stdout - assert tick_box + ' Installing sudoer file' 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 - -def test_installPiholeWeb_index_php_no_errors(Pihole): - ''' confirms all web page assets from Core repo are installed when necessary ''' - installWeb = Pihole.run(''' - source /opt/pihole/basic-install.sh - mkdir -p /var/www/html/pihole - touch /var/www/html/pihole/index.php - installPiholeWeb - ''') - assert info_box + ' Installing blocking page...' in installWeb.stdout - assert info_box + ' Installing index.php' in installWeb.stdout - assert 'detected index.php, not overwriting' in installWeb.stdout - assert info_box + ' Installing index.js' in installWeb.stdout - assert info_box + ' Installing blockingpage.css' in installWeb.stdout - assert 'No default index.lighttpd.html file found... not backing up' not in installWeb.stdout - assert tick_box + ' Installing sudoer file' 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 - -def test_installPiholeWeb_index_js_no_errors(Pihole): - ''' confirms all web page assets from Core repo are installed when necessary ''' - installWeb = Pihole.run(''' - source /opt/pihole/basic-install.sh - mkdir -p /var/www/html/pihole - touch /var/www/html/pihole/index.js - installPiholeWeb - ''') - assert info_box + ' Installing blocking page...' in installWeb.stdout - assert info_box + ' Installing index.php' in installWeb.stdout - assert info_box + ' Installing index.js' in installWeb.stdout - assert 'detected index.js, not overwriting' in installWeb.stdout - assert info_box + ' Installing blockingpage.css' in installWeb.stdout - assert 'No default index.lighttpd.html file found... not backing up' not in installWeb.stdout - assert tick_box + ' Installing sudoer file' 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 - -def test_installPiholeWeb_blockingpage_css_no_errors(Pihole): - ''' confirms all web page assets from Core repo are installed when necessary ''' - installWeb = Pihole.run(''' - source /opt/pihole/basic-install.sh - mkdir -p /var/www/html/pihole - touch /var/www/html/pihole/blockingpage.css - installPiholeWeb - ''') - assert info_box + ' Installing blocking page...' in installWeb.stdout - assert info_box + ' Installing index.php' in installWeb.stdout - assert info_box + ' Installing index.js' in installWeb.stdout - assert info_box + ' Installing blockingpage.css' in installWeb.stdout - assert 'detected blockingpage.css, not overwriting' in installWeb.stdout - assert 'No default index.lighttpd.html file found... not backing up' not in installWeb.stdout - assert tick_box + ' Installing sudoer file' 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 - -def test_installPiholeWeb_already_populated_no_errors(Pihole): - ''' confirms all web page assets from Core repo are installed when necessary ''' - installWeb = Pihole.run(''' - source /opt/pihole/basic-install.sh - mkdir -p /var/www/html/pihole - touch /var/www/html/pihole/index.php - touch /var/www/html/pihole/index.js - touch /var/www/html/pihole/blockingpage.css - installPiholeWeb - ''') - assert info_box + ' Installing blocking page...' in installWeb.stdout - assert info_box + ' Installing index.php' in installWeb.stdout - assert 'detected index.php, not overwriting' in installWeb.stdout - assert info_box + ' Installing index.js' in installWeb.stdout - assert 'detected index.js, not overwriting' in installWeb.stdout - assert info_box + ' Installing blockingpage.css' in installWeb.stdout - assert 'detected blockingpage.css, not overwriting' in installWeb.stdout - assert tick_box + ' Installing sudoer file' 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 - def test_update_package_cache_success_no_errors(Pihole): ''' confirms package cache was updated without any errors''' updateCache = Pihole.run('''