mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-21 23:00:18 +00:00
fix stickler errors
Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com>
This commit is contained in:
parent
0dad970904
commit
45fe918516
2 changed files with 8 additions and 7 deletions
|
@ -1431,7 +1431,8 @@ installConfigs() {
|
||||||
# Make the directories if they do not exist and set the owners
|
# Make the directories if they do not exist and set the owners
|
||||||
mkdir -p /run/lighttpd
|
mkdir -p /run/lighttpd
|
||||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /run/lighttpd
|
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /run/lighttpd
|
||||||
local varcache=$(test -d /var/cache; echo $?)
|
test -d /var/cache
|
||||||
|
local varcache=$?
|
||||||
mkdir -p /var/cache/lighttpd/compress
|
mkdir -p /var/cache/lighttpd/compress
|
||||||
if [[ ! "${varcache}" -eq 0 ]]; then
|
if [[ ! "${varcache}" -eq 0 ]]; then
|
||||||
chmod a+rx /var/cache
|
chmod a+rx /var/cache
|
||||||
|
|
|
@ -175,7 +175,7 @@ def test_installPihole_fresh_install_readableFiles(Pihole):
|
||||||
'0'
|
'0'
|
||||||
),
|
),
|
||||||
'restart pihole-FTL': (
|
'restart pihole-FTL': (
|
||||||
'',
|
'',
|
||||||
'0'
|
'0'
|
||||||
),
|
),
|
||||||
'start pihole-FTL': (
|
'start pihole-FTL': (
|
||||||
|
@ -227,7 +227,7 @@ def test_installPihole_fresh_install_readableFiles(Pihole):
|
||||||
# check_adlist = test_cmd.format('r', '/etc/pihole/adlists.list', piholeuser)
|
# check_adlist = test_cmd.format('r', '/etc/pihole/adlists.list', piholeuser)
|
||||||
# actual_rc = Pihole.run(check_adlist).rc
|
# actual_rc = Pihole.run(check_adlist).rc
|
||||||
# assert exit_status_success == actual_rc
|
# assert exit_status_success == actual_rc
|
||||||
#readable and writable dhcp.leases
|
# readable and writable dhcp.leases
|
||||||
check_leases = test_cmd.format('r', '/etc/pihole/dhcp.leases', piholeuser)
|
check_leases = test_cmd.format('r', '/etc/pihole/dhcp.leases', piholeuser)
|
||||||
actual_rc = Pihole.run(check_leases).rc
|
actual_rc = Pihole.run(check_leases).rc
|
||||||
assert exit_status_success == actual_rc
|
assert exit_status_success == actual_rc
|
||||||
|
@ -474,8 +474,7 @@ def test_installPihole_fresh_install_readableBlockpage(Pihole, test_webpage):
|
||||||
)
|
)
|
||||||
FTLcommand = dedent('''\"
|
FTLcommand = dedent('''\"
|
||||||
/etc/init.d/pihole-FTL restart
|
/etc/init.d/pihole-FTL restart
|
||||||
echo \"'''
|
echo \"''')
|
||||||
)
|
|
||||||
mock_command_2(
|
mock_command_2(
|
||||||
'systemctl',
|
'systemctl',
|
||||||
{
|
{
|
||||||
|
@ -496,7 +495,7 @@ def test_installPihole_fresh_install_readableBlockpage(Pihole, test_webpage):
|
||||||
'0'
|
'0'
|
||||||
),
|
),
|
||||||
'restart pihole-FTL': (
|
'restart pihole-FTL': (
|
||||||
FTLcommand,
|
FTLcommand,
|
||||||
'0'
|
'0'
|
||||||
),
|
),
|
||||||
'start pihole-FTL': (
|
'start pihole-FTL': (
|
||||||
|
@ -634,7 +633,8 @@ def test_installPihole_fresh_install_readableBlockpage(Pihole, test_webpage):
|
||||||
r"failed to open stream: " +
|
r"failed to open stream: " +
|
||||||
r"Permission denied in"),
|
r"Permission denied in"),
|
||||||
re.I)
|
re.I)
|
||||||
status = ('curl -s --head "{}" | ' +
|
status = (
|
||||||
|
'curl -s --head "{}" | ' +
|
||||||
'head -n 1 | ' +
|
'head -n 1 | ' +
|
||||||
'grep "HTTP/1.[01] [23].." > /dev/null')
|
'grep "HTTP/1.[01] [23].." > /dev/null')
|
||||||
pagecontent = 'curl --verbose -L "{}"'
|
pagecontent = 'curl --verbose -L "{}"'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue