From c9edcfa33563e849d98e47143dc4f4d3e7cd44af Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Tue, 28 Jul 2020 19:07:17 +0100 Subject: [PATCH] add test to check "os_check" works Signed-off-by: Adam Warner --- test/test_automated_install.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/test_automated_install.py b/test/test_automated_install.py index 342d8a3c..c0648b71 100644 --- a/test/test_automated_install.py +++ b/test/test_automated_install.py @@ -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