1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 06:48:07 +00:00

assert REMI repository is not installed for Fedora

- fix whiptail mock comments to clarify continue vs cancel

Signed-off-by: bcambl <blayne@blaynecampbell.com>
This commit is contained in:
bcambl 2018-07-08 13:58:23 -06:00
parent 4c23964964
commit fff31558a0
2 changed files with 7 additions and 5 deletions

View File

@ -269,7 +269,7 @@ def test_selinux_enforcing_continue(Pihole):
'''
# getenforce returns the running state of SELinux
mock_command('getenforce', {'*': ('Enforcing', '0')}, Pihole)
# Whiptail dialog returns Cancel for user prompt
# Whiptail dialog returns Continue for user prompt
mock_command('whiptail', {'*': ('', '0')}, Pihole)
check_selinux = Pihole.run('''
source /opt/pihole/basic-install.sh

View File

@ -11,7 +11,8 @@ from conftest import (
@pytest.mark.parametrize("tag", [('fedora'), ])
def test_epel_and_remi_not_installed_fedora(Pihole):
'''
confirms installer does not attempt to install EPEL repository on Fedora
confirms installer does not attempt to install EPEL/REMI repositories
on Fedora
'''
distro_check = Pihole.run('''
source /opt/pihole/basic-install.sh
@ -27,6 +28,8 @@ def test_epel_and_remi_not_installed_fedora(Pihole):
assert expected_stdout not in distro_check.stdout
epel_package = Pihole.package('epel-release')
assert not epel_package.is_installed
remi_package = Pihole.package('remi-release')
assert not remi_package.is_installed
@pytest.mark.parametrize("tag", [('centos'), ])
@ -51,7 +54,6 @@ def test_release_supported_version_check_centos(Pihole):
assert expected_stdout in distro_check.stdout
expected_stdout = 'Please update to CentOS release 7 or later'
assert expected_stdout in distro_check.stdout
# assert distro_check.rc == 1 # currently only exits.. should exit 1?
@pytest.mark.parametrize("tag", [('centos'), ])
@ -113,7 +115,7 @@ def test_php_upgrade_user_optin_centos(Pihole):
confirms installer behavior when user opt-in to installing PHP7 from REMI
(php not currently installed)
'''
# Whiptail dialog returns Cancel for user prompt
# Whiptail dialog returns Continue for user prompt
mock_command('whiptail', {'*': ('', '0')}, Pihole)
distro_check = Pihole.run('''
source /opt/pihole/basic-install.sh
@ -192,7 +194,7 @@ def test_php_version_lt_7_detected_upgrade_user_optin_centos(Pihole):
default_centos_php_version = php_package.version.split('.')[0]
if int(default_centos_php_version) >= 7: # PHP7 is supported/recommended
pytest.skip("Test deprecated . Detected default PHP version >= 7")
# Whiptail dialog returns Cancel for user prompt
# Whiptail dialog returns Continue for user prompt
mock_command('whiptail', {'*': ('', '0')}, Pihole)
distro_check = Pihole.run('''
source /opt/pihole/basic-install.sh