mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Add test for the case the binary variable is unset (defaults to "tbd" in this case)
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
d26f2dcb2c
commit
7479485d45
1 changed files with 16 additions and 2 deletions
|
@ -481,7 +481,6 @@ def test_FTL_download_aarch64_no_errors(Pihole):
|
||||||
'''
|
'''
|
||||||
confirms only aarch64 package is downloaded for FTL engine
|
confirms only aarch64 package is downloaded for FTL engine
|
||||||
'''
|
'''
|
||||||
# mock uname to return generic platform
|
|
||||||
download_binary = Pihole.run('''
|
download_binary = Pihole.run('''
|
||||||
source /opt/pihole/basic-install.sh
|
source /opt/pihole/basic-install.sh
|
||||||
binary="pihole-FTL-aarch64-linux-gnu"
|
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
|
confirms unknown binary is not downloaded for FTL engine
|
||||||
'''
|
'''
|
||||||
# mock uname to return generic platform
|
|
||||||
download_binary = Pihole.run('''
|
download_binary = Pihole.run('''
|
||||||
source /opt/pihole/basic-install.sh
|
source /opt/pihole/basic-install.sh
|
||||||
binary="pihole-FTL-mips"
|
binary="pihole-FTL-mips"
|
||||||
|
@ -510,6 +508,22 @@ def test_FTL_download_unknown_fails_no_errors(Pihole):
|
||||||
assert error2 in download_binary.stdout
|
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):
|
def test_FTL_binary_installed_and_responsive_no_errors(Pihole):
|
||||||
'''
|
'''
|
||||||
confirms FTL binary is copied and functional in installed location
|
confirms FTL binary is copied and functional in installed location
|
||||||
|
|
Loading…
Reference in a new issue