Files
dokku/tests/unit/events.bats
Alessio Treglia 91c691a806 Create dokku's /var/log/dokku/ private namespace
Rename dokku.log to events.log.
Refresh tests accordingly.
2015-07-01 18:25:11 +01:00

41 lines
827 B
Bash

#!/usr/bin/env bats
load test_helper
setup() {
create_app
}
teardown() {
destroy_app
}
@test "(events) check conffiles" {
run bash -c "test -f /etc/logrotate.d/dokku"
echo "output: "$output
echo "status: "$status
assert_success
run bash -c "test -f /etc/rsyslog.d/99-dokku.conf"
echo "output: "$output
echo "status: "$status
assert_success
run bash -c "stat -c '%U:%G:%a' /var/log/dokku/"
echo "output: "$output
echo "status: "$status
assert_output "syslog:dokku:775"
run bash -c "stat -c '%U:%G:%a' /var/log/dokku/events.log"
echo "output: "$output
echo "status: "$status
assert_output "syslog:dokku:664"
}
@test "(events) log commands" {
run dokku events:on
deploy_app
run dokku events
echo "output: "$output
echo "status: "$status
assert_success
run dokku events:off
}