Add small test suite for events logging

This commit is contained in:
Alessio Treglia
2015-06-30 12:05:35 +01:00
parent 69aba06361
commit b380bde9f3

36
tests/unit/events.bats Normal file
View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bats
load test_helper
setup() {
create_app
}
teardown() {
destroy_app
}
@test "(events) check conffiles" {
test -f /etc/logrotate.d/dokku
echo "output: "$output
echo "status: "$status
assert_success
test -f /etc/rsyslog.d/99-dokku.conf
echo "output: "$output
echo "status: "$status
assert_success
stats -c '%U:%G:%a' /var/log/dokku.log
echo "output: "$output
echo "status: "$status
assert_output "syslog:dokku:644"
}
@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
}