Skip to content

Commit 4decae8

Browse files
authored
Merge pull request #1805 from pi-hole/development
Dev -> Master
2 parents 1213fc6 + 3c86c4a commit 4decae8

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/crontab.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
59 1 * * 7 PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updateGravity >/var/log/pihole/pihole_updateGravity.log || cat /var/log/pihole/pihole_updateGravity.log
1+
59 1 * * 0 PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updateGravity >/var/log/pihole/pihole_updateGravity.log || cat /var/log/pihole/pihole_updateGravity.log
22
00 00 * * * PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole flush once quiet
33
59 17 * * * PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updatechecker

test/tests/test_general.py

+13
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ def test_pihole_gid_env_var(docker):
1212
func = docker.run("id -g pihole")
1313
assert "456" in func.stdout
1414

15+
1516
def test_pihole_ftl_version(docker):
1617
func = docker.run("pihole-FTL -vv")
1718
assert func.rc == 0
1819
assert "Version:" in func.stdout
1920

21+
2022
# Wait 5 seconds for startup, then kill the start.sh script
2123
# Finally, grep the FTL log to see if it has been shut down cleanly
2224
def test_pihole_ftl_clean_shutdown(docker):
@@ -30,3 +32,14 @@ def test_pihole_ftl_clean_shutdown(docker):
3032
)
3133
assert "INFO: ########## FTL terminated after" in func.stdout
3234
assert "(code 0)" in func.stdout
35+
36+
37+
def test_cronfile_valid(docker):
38+
func = docker.run(
39+
"""
40+
/usr/bin/crontab /crontab.txt
41+
crond -d 8 -L /cron.log
42+
grep 'parse error' /cron.log
43+
"""
44+
)
45+
assert "parse error" not in func.stdout

0 commit comments

Comments
 (0)