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:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user