Replace underscore by dash in exposed hostname

Fixes #28
This commit is contained in:
Loïc Guitaut
2015-09-29 18:51:49 +02:00
parent 78314ef8ad
commit f0a647053b
2 changed files with 9 additions and 1 deletions

View File

@@ -24,3 +24,11 @@ teardown() {
password="$(cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
assert_contains "${lines[*]}" "DSN: postgres://postgres:$password@dokku-postgres-l:5432/l"
}
@test "($PLUGIN_COMMAND_PREFIX:info) replaces underscores by dash in hostname" {
dokku "$PLUGIN_COMMAND_PREFIX:create" test_with_underscores
run dokku "$PLUGIN_COMMAND_PREFIX:info" test_with_underscores
password="$(cat "$PLUGIN_DATA_ROOT/test_with_underscores/PASSWORD")"
assert_contains "${lines[*]}" "DSN: postgres://postgres:$password@dokku-postgres-test-with-underscores:5432/test_with_underscores"
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" test_with_underscores
}