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!
This commit is contained in:
Jose Diaz-Gonzalez
2019-03-18 14:44:28 -04:00
parent 9fa9b4a975
commit 623d125e83
34 changed files with 398 additions and 325 deletions

View File

@@ -2,13 +2,11 @@
load test_helper
setup() {
export ECHO_DOCKER_COMMAND="false"
dokku "$PLUGIN_COMMAND_PREFIX:create" l >&2
dokku "$PLUGIN_COMMAND_PREFIX:create" l
}
teardown() {
export ECHO_DOCKER_COMMAND="false"
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" l >&2
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" l
}
@test "($PLUGIN_COMMAND_PREFIX:connect) error when there are no arguments" {
@@ -22,7 +20,6 @@ teardown() {
}
@test "($PLUGIN_COMMAND_PREFIX:connect) success" {
export ECHO_DOCKER_COMMAND="true"
run dokku "$PLUGIN_COMMAND_PREFIX:connect" l
assert_output 'docker exec -i -t dokku.postgres.l psql -h localhost -U postgres l'
}