remove tests no longer needed
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
b613758419
commit
fc2a564cc0
|
@ -1,68 +0,0 @@
|
||||||
from .conftest import (
|
|
||||||
tick_box,
|
|
||||||
info_box,
|
|
||||||
mock_command,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_php_upgrade_default_continue_centos_gte_8(host):
|
|
||||||
'''
|
|
||||||
confirms the latest version of CentOS continues / does not optout
|
|
||||||
(should trigger on CentOS7 only)
|
|
||||||
'''
|
|
||||||
package_manager_detect = host.run('''
|
|
||||||
source /opt/pihole/basic-install.sh
|
|
||||||
package_manager_detect
|
|
||||||
check_epel_repo_required
|
|
||||||
''')
|
|
||||||
unexpected_stdout = info_box + (' User opt-out of PHP 7 upgrade on CentOS.'
|
|
||||||
' Deprecated PHP may be in use.')
|
|
||||||
assert unexpected_stdout not in package_manager_detect.stdout
|
|
||||||
# ensure remi was not installed on latest CentOS
|
|
||||||
remi_package = host.package('remi-release')
|
|
||||||
assert not remi_package.is_installed
|
|
||||||
|
|
||||||
|
|
||||||
def test_php_upgrade_user_optout_skipped_centos_gte_8(host):
|
|
||||||
'''
|
|
||||||
confirms installer skips user opt-out of installing PHP7 from REMI on
|
|
||||||
latest CentOS (should trigger on CentOS7 only)
|
|
||||||
(php not currently installed)
|
|
||||||
'''
|
|
||||||
# dialog dialog returns Cancel for user prompt
|
|
||||||
mock_command('dialog', {'*': ('', '1')}, host)
|
|
||||||
package_manager_detect = host.run('''
|
|
||||||
source /opt/pihole/basic-install.sh
|
|
||||||
package_manager_detect
|
|
||||||
check_epel_repo_required
|
|
||||||
''')
|
|
||||||
unexpected_stdout = info_box + (' User opt-out of PHP 7 upgrade on CentOS.'
|
|
||||||
' Deprecated PHP may be in use.')
|
|
||||||
assert unexpected_stdout not in package_manager_detect.stdout
|
|
||||||
# ensure remi was not installed on latest CentOS
|
|
||||||
remi_package = host.package('remi-release')
|
|
||||||
assert not remi_package.is_installed
|
|
||||||
|
|
||||||
|
|
||||||
def test_php_upgrade_user_optin_skipped_centos_gte_8(host):
|
|
||||||
'''
|
|
||||||
confirms installer skips user opt-in to installing PHP7 from REMI on
|
|
||||||
latest CentOS (should trigger on CentOS7 only)
|
|
||||||
(php not currently installed)
|
|
||||||
'''
|
|
||||||
# dialog dialog returns Continue for user prompt
|
|
||||||
mock_command('dialog', {'*': ('', '0')}, host)
|
|
||||||
package_manager_detect = host.run('''
|
|
||||||
source /opt/pihole/basic-install.sh
|
|
||||||
package_manager_detect
|
|
||||||
check_epel_repo_required
|
|
||||||
''')
|
|
||||||
assert 'opt-out' not in package_manager_detect.stdout
|
|
||||||
unexpected_stdout = info_box + (' Enabling Remi\'s RPM repository '
|
|
||||||
'(https://rpms.remirepo.net)')
|
|
||||||
assert unexpected_stdout not in package_manager_detect.stdout
|
|
||||||
unexpected_stdout = tick_box + (' Remi\'s RPM repository has '
|
|
||||||
'been enabled for PHP7')
|
|
||||||
assert unexpected_stdout not in package_manager_detect.stdout
|
|
||||||
remi_package = host.package('remi-release')
|
|
||||||
assert not remi_package.is_installed
|
|
|
@ -5,4 +5,4 @@ envlist = py38
|
||||||
whitelist_externals = docker
|
whitelist_externals = docker
|
||||||
deps = -rrequirements.txt
|
deps = -rrequirements.txt
|
||||||
commands = docker build -f _centos_8.Dockerfile -t pytest_pihole:test_container ../
|
commands = docker build -f _centos_8.Dockerfile -t pytest_pihole:test_container ../
|
||||||
pytest {posargs:-vv -n auto} ./test_any_automated_install.py ./test_any_utils.py ./test_centos_fedora_common_support.py ./test_centos_common_support.py ./test_centos_8_support.py
|
pytest {posargs:-vv -n auto} ./test_any_automated_install.py ./test_any_utils.py ./test_centos_fedora_common_support.py ./test_centos_common_support.py
|
||||||
|
|
Loading…
Reference in New Issue