Files
dokku-postgres/tests/hook_pre_delete.bats
Jose Diaz-Gonzalez 623d125e83 feat: Real docker-based testing
This pull request switches testing to use an actual docker daemon, vs mocking everything out.

It may also catch actual breaking issues in our tests, which is great!
2019-03-18 14:44:28 -04:00

20 lines
516 B
Bash
Executable File

#!/usr/bin/env bats
load test_helper
setup() {
dokku apps:create my_app
dokku "$PLUGIN_COMMAND_PREFIX:create" l
dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app >&2
}
teardown() {
dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app >&2
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" l
}
@test "($PLUGIN_COMMAND_PREFIX:hook:pre-delete) removes app from links file when destroying app" {
[[ -n $(< "$PLUGIN_DATA_ROOT/l/LINKS") ]]
dokku --force apps:destroy my_app
[[ -z $(< "$PLUGIN_DATA_ROOT/l/LINKS") ]]
}