From 7479485d4518e0fda8ea46d255e504d193013722 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 31 Jan 2019 20:00:26 +0100 Subject: [PATCH] Add test for the case the binary variable is unset (defaults to "tbd" in this case) Signed-off-by: DL6ER --- test/test_automated_install.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/test/test_automated_install.py b/test/test_automated_install.py index ce0abfd2..853048d1 100644 --- a/test/test_automated_install.py +++ b/test/test_automated_install.py @@ -481,7 +481,6 @@ def test_FTL_download_aarch64_no_errors(Pihole): ''' confirms only aarch64 package is downloaded for FTL engine ''' - # mock uname to return generic platform download_binary = Pihole.run(''' source /opt/pihole/basic-install.sh binary="pihole-FTL-aarch64-linux-gnu" @@ -496,7 +495,6 @@ def test_FTL_download_unknown_fails_no_errors(Pihole): ''' confirms unknown binary is not downloaded for FTL engine ''' - # mock uname to return generic platform download_binary = Pihole.run(''' source /opt/pihole/basic-install.sh binary="pihole-FTL-mips" @@ -510,6 +508,22 @@ def test_FTL_download_unknown_fails_no_errors(Pihole): assert error2 in download_binary.stdout +def test_FTL_download_binary_unset_no_errors(Pihole): + ''' + confirms unset binary variable does not download FTL engine + ''' + download_binary = Pihole.run(''' + source /opt/pihole/basic-install.sh + FTLinstall + ''') + expected_stdout = cross_box + ' Downloading and Installing FTL' + assert expected_stdout in download_binary.stdout + error1 = 'Error: URL https://github.com/pi-hole/FTL/releases/download/' + assert error1 in download_binary.stdout + error2 = 'not found' + assert error2 in download_binary.stdout + + def test_FTL_binary_installed_and_responsive_no_errors(Pihole): ''' confirms FTL binary is copied and functional in installed location