mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Revert "add test case for installation of dependencies for installer, core and web"
This reverts commit 60a4814ac1
.
Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com>
This commit is contained in:
parent
cb49ce38f5
commit
4386cc4f22
@ -595,80 +595,3 @@ def test_os_check_passes(Pihole):
|
|||||||
''')
|
''')
|
||||||
expected_stdout = 'Supported OS detected'
|
expected_stdout = 'Supported OS detected'
|
||||||
assert expected_stdout in detectOS.stdout
|
assert expected_stdout in detectOS.stdout
|
||||||
|
|
||||||
|
|
||||||
def test_install_dependent_packages_no_errors(Pihole):
|
|
||||||
'''
|
|
||||||
confirms all dependent packages are installed on a fresh build
|
|
||||||
'''
|
|
||||||
# mock whiptail answers to use universe repo if asked
|
|
||||||
mock_command('whiptail', {'*': ('', '1')}, Pihole)
|
|
||||||
# create configuration file
|
|
||||||
setup_var_file = 'cat <<EOF> /etc/pihole/setupVars.conf\n'
|
|
||||||
for k, v in SETUPVARS.items():
|
|
||||||
setup_var_file += "{}={}\n".format(k, v)
|
|
||||||
setup_var_file += "EOF\n"
|
|
||||||
Pihole.run(setup_var_file)
|
|
||||||
install = Pihole.run('''
|
|
||||||
runUnattended=true
|
|
||||||
useUpdateVars=true
|
|
||||||
source /opt/pihole/basic-install.sh
|
|
||||||
runUnattended=true
|
|
||||||
useUpdateVars=true
|
|
||||||
distro_check
|
|
||||||
update_package_cache || exit 1
|
|
||||||
install_dependent_packages "${INSTALLER_DEPS[@]}"
|
|
||||||
''')
|
|
||||||
|
|
||||||
assert install.rc == 0
|
|
||||||
|
|
||||||
|
|
||||||
def test_install_dependent_packages_web_no_errors(Pihole):
|
|
||||||
'''
|
|
||||||
confirms all dependent web packages are installed on a fresh build
|
|
||||||
'''
|
|
||||||
# mock whiptail answers to use universe repo if asked
|
|
||||||
mock_command('whiptail', {'*': ('', '1')}, Pihole)
|
|
||||||
# mock systemctl to start lighttpd
|
|
||||||
mock_command_2(
|
|
||||||
'systemctl',
|
|
||||||
{
|
|
||||||
'enable lighttpd': (
|
|
||||||
'',
|
|
||||||
'0'
|
|
||||||
),
|
|
||||||
'restart lighttpd': (
|
|
||||||
'/etc/init.d/lighttpd restart',
|
|
||||||
'0'
|
|
||||||
),
|
|
||||||
'start lighttpd': (
|
|
||||||
'/etc/init.d/lighttpd start',
|
|
||||||
'0'
|
|
||||||
)
|
|
||||||
},
|
|
||||||
Pihole
|
|
||||||
)
|
|
||||||
# create configuration file
|
|
||||||
setup_var_file = 'cat <<EOF> /etc/pihole/setupVars.conf\n'
|
|
||||||
for k, v in SETUPVARS.items():
|
|
||||||
setup_var_file += "{}={}\n".format(k, v)
|
|
||||||
setup_var_file += "EOF\n"
|
|
||||||
Pihole.run(setup_var_file)
|
|
||||||
install = Pihole.run('''
|
|
||||||
runUnattended=true
|
|
||||||
useUpdateVars=true
|
|
||||||
INSTALL_WEB_SERVER=true
|
|
||||||
source /opt/pihole/basic-install.sh
|
|
||||||
runUnattended=true
|
|
||||||
useUpdateVars=true
|
|
||||||
INSTALL_WEB_SERVER=true
|
|
||||||
distro_check
|
|
||||||
update_package_cache || exit 1
|
|
||||||
dep_install_list=("${PIHOLE_DEPS[@]}")
|
|
||||||
if [[ "${INSTALL_WEB_SERVER}" == true ]]; then
|
|
||||||
dep_install_list+=("${PIHOLE_WEB_DEPS[@]}")
|
|
||||||
fi
|
|
||||||
install_dependent_packages "${dep_install_list[@]}"
|
|
||||||
''')
|
|
||||||
|
|
||||||
assert install.rc == 0
|
|
||||||
|
Loading…
Reference in New Issue
Block a user