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 18cbd91c1c
commit c41bcc9c1b
34 changed files with 399 additions and 329 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,9 +20,8 @@ teardown() {
}
@test "($PLUGIN_COMMAND_PREFIX:connect) success" {
export ECHO_DOCKER_COMMAND="true"
run dokku "$PLUGIN_COMMAND_PREFIX:connect" l
password="$(cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
password="$(sudo cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
assert_output "docker exec -i -t dokku.mysql.l mysql --user=mysql --password=$password --database=l"
}