2020-12-01 10:02:31 +00:00
|
|
|
import pytest
|
|
|
|
from .conftest import (
|
|
|
|
tick_box,
|
|
|
|
info_box,
|
|
|
|
cross_box,
|
|
|
|
mock_command,
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2021-11-18 01:03:37 +00:00
|
|
|
def test_enable_epel_repository_centos(host):
|
2020-12-01 10:02:31 +00:00
|
|
|
'''
|
|
|
|
confirms the EPEL package repository is enabled when installed on CentOS
|
|
|
|
'''
|
2021-11-18 01:03:37 +00:00
|
|
|
package_manager_detect = host.run('''
|
2020-12-01 10:02:31 +00:00
|
|
|
source /opt/pihole/basic-install.sh
|
2021-08-03 20:48:26 +00:00
|
|
|
package_manager_detect
|
2022-07-30 15:19:40 +00:00
|
|
|
check_epel_repo_required
|
2020-12-01 10:02:31 +00:00
|
|
|
''')
|
|
|
|
expected_stdout = info_box + (' Enabling EPEL package repository '
|
|
|
|
'(https://fedoraproject.org/wiki/EPEL)')
|
2021-08-03 20:48:26 +00:00
|
|
|
assert expected_stdout in package_manager_detect.stdout
|
2022-07-03 00:47:41 +00:00
|
|
|
expected_stdout = tick_box + ' Installed'
|
2021-08-03 20:48:26 +00:00
|
|
|
assert expected_stdout in package_manager_detect.stdout
|
2021-11-18 01:03:37 +00:00
|
|
|
epel_package = host.package('epel-release')
|
2020-12-01 10:02:31 +00:00
|
|
|
assert epel_package.is_installed
|