From 09d40679c0d26aa139df1eff0b7a6cf1727ecb40 Mon Sep 17 00:00:00 2001 From: bcambl Date: Fri, 6 Jul 2018 10:07:43 -0600 Subject: [PATCH] add test for unsupported distro checking Signed-off-by: bcambl --- test/test_automated_install.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/test_automated_install.py b/test/test_automated_install.py index 3718282f..683c688c 100644 --- a/test/test_automated_install.py +++ b/test/test_automated_install.py @@ -10,6 +10,22 @@ from conftest import ( ) +def test_supported_operating_system(Pihole): + ''' + confirm installer exists on unsupported distribution + ''' + # break supported package managers to emulate an unsupported distribution + Pihole.run('rm -rf /usr/bin/apt-get') + Pihole.run('rm -rf /usr/bin/rpm') + distro_check = Pihole.run(''' + source /opt/pihole/basic-install.sh + distro_check + ''') + expected_stdout = cross_box + ' OS distribution not supported' + assert expected_stdout in distro_check.stdout + # assert distro_check.rc == 1 + + def test_setupVars_are_sourced_to_global_scope(Pihole): ''' currently update_dialogs sources setupVars with a dot,