fix: ensure the dokku-retire timer is properly installed

Closes #3615
This commit is contained in:
Jose Diaz-Gonzalez committed 2019-07-17 20:48:57 -04:00
1 parent 22ffa41d31
commit 5a52286309
2 files changed
+24

No files matched your search

+6
View File
@@ -38,9 +38,15 @@ Description=Run dokku-retire.service every 5 minutes
[Timer] [Timer]
OnCalendar=*:0/5 OnCalendar=*:0/5
Persistent=true
[Install]
WantedBy=timers.target
EOF EOF
if command -v systemctl &>/dev/null; then if command -v systemctl &>/dev/null; then
systemctl --quiet reenable dokku-retire systemctl --quiet reenable dokku-retire
systemctl --quiet enable dokku-retire.timer
systemctl --quiet start dokku-retire.timer
fi fi
else else
cat <<EOF >/etc/cron.d/dokku-retire cat <<EOF >/etc/cron.d/dokku-retire
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bats
load test_helper
setup() {
global_setup
}
teardown() {
global_teardown
}
@test "(scheduler-docker-local) timer installed" {
run /bin/bash -c "systemctl list-timers | grep dokku-retire"
echo "output: $output"
echo "status: $status"
assert_success
}