1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-10-18 05:49:10 +00:00
pi-hole/test/test_fedora_support.py
Adam Warner cdd4d9ea9e
Update the tests (#4427)
* unpin the requirements and update all to latest available - needs more work still. see notes in `def host()`

Signed-off-by: Adam Warner <me@adamwarner.co.uk>

* fix py3 monkey patch of testinfra docker using bash

Signed-off-by: Adam Hill <adam@diginc.us>

* update the other test files to use `host` instead of `Pihole`
Address some sticklr and codefactor
update python version from 3.7 to 3.8
preload `git` onto the centos/fedora test images, and switch which with command -v in the passthrough mock
testinfra is deprecated, use pytest-testinfra

Signed-off-by: Adam Warner <me@adamwarner.co.uk>

Co-authored-by: Adam Hill <adam@diginc.us>
2021-11-18 01:03:37 +00:00

17 lines
518 B
Python

def test_epel_and_remi_not_installed_fedora(host):
'''
confirms installer does not attempt to install EPEL/REMI repositories
on Fedora
'''
package_manager_detect = host.run('''
source /opt/pihole/basic-install.sh
package_manager_detect
select_rpm_php
''')
assert package_manager_detect.stdout == ''
epel_package = host.package('epel-release')
assert not epel_package.is_installed
remi_package = host.package('remi-release')
assert not remi_package.is_installed