mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-26 14:50:17 +00:00
Start test templates.
This commit is contained in:
parent
0375a3caa3
commit
297d4eec57
2 changed files with 12 additions and 2 deletions
|
@ -701,8 +701,9 @@ update_pacakge_cache() {
|
||||||
|
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo -n "::: Updating local cache of available packages..."
|
echo -n "::: Updating local cache of available packages..."
|
||||||
${UPDATE_PKG_CACHE} &> /dev/null
|
if ${UPDATE_PKG_CACHE}; then
|
||||||
echo " done!"
|
echo " done!"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
notify_package_updates_available() {
|
notify_package_updates_available() {
|
||||||
|
|
|
@ -274,6 +274,15 @@ def test_installPiholeWeb_already_populated_no_errors(Pihole):
|
||||||
assert 'index.js' in web_directory
|
assert 'index.js' in web_directory
|
||||||
assert 'blockingpage.css' in web_directory
|
assert 'blockingpage.css' in web_directory
|
||||||
|
|
||||||
|
def test_update_package_cache_success_no_errors(Pihole):
|
||||||
|
''' confirms package cache was updated without any errors'''
|
||||||
|
updateCache = Pihole.run('''
|
||||||
|
source /opt/pihole/basick-install.sh
|
||||||
|
update_pacakge_cache
|
||||||
|
''')
|
||||||
|
assert 'Updating local cache of available packages...' in updateCache.stdout
|
||||||
|
assert 'done!' in updateCache.stdout
|
||||||
|
|
||||||
# Helper functions
|
# Helper functions
|
||||||
def mock_command(script, args, container):
|
def mock_command(script, args, container):
|
||||||
''' Allows for setup of commands we don't really want to have to run for real in unit tests '''
|
''' Allows for setup of commands we don't really want to have to run for real in unit tests '''
|
||||||
|
|
Loading…
Reference in a new issue