add test to check "os_check" works

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2020-07-28 19:07:17 +01:00
parent 33e5735053
commit c9edcfa335
No known key found for this signature in database
GPG Key ID: 872950F3ECF2B173
1 changed files with 14 additions and 0 deletions

View File

@ -561,3 +561,17 @@ def test_validate_ip_invalid_letters(Pihole):
''')
assert output.rc == 1
def test_os_check_pases(Pihole):
''' Confirms OS meets the requirements '''
Pihole.run('''
source /opt/pihole/basic-install.sh
distro_check
install_dependent_packages ${INSTALLER_DEPS[@]}
''')
detectOS = Pihole.run('''
source /opt/pihole/basic-install.sh
os_check
''')
expected_stdout = 'Supported OS detected'
assert expected_stdout in detectOS.stdout