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