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,11 +2,11 @@
load test_helper
setup() {
dokku "$PLUGIN_COMMAND_PREFIX:create" l >&2
dokku "$PLUGIN_COMMAND_PREFIX:create" l
}
teardown() {
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" l >&2
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" l
}
@test "($PLUGIN_COMMAND_PREFIX:expose) error when there are no arguments" {
@@ -19,12 +19,12 @@ teardown() {
assert_contains "${lines[*]}" "service not_existing_service does not exist"
}
@test "($PLUGIN_COMMAND_PREFIX:expose) success when not providing a custom port" {
@test "($PLUGIN_COMMAND_PREFIX:expose) success when not providing custom ports" {
run dokku "$PLUGIN_COMMAND_PREFIX:expose" l
[[ "${lines[*]}" =~ exposed\ on\ port\(s\)\ \[container\-\>host\]\:\ [[:digit:]]+ ]]
}
@test "($PLUGIN_COMMAND_PREFIX:expose) success when providing a custom port" {
@test "($PLUGIN_COMMAND_PREFIX:expose) success when providing custom ports" {
run dokku "$PLUGIN_COMMAND_PREFIX:expose" l 4242
assert_contains "${lines[*]}" "exposed on port(s) [container->host]: 5432->4242"
}