mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Add small test suite for events logging
This commit is contained in:
36
tests/unit/events.bats
Normal file
36
tests/unit/events.bats
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user