Display infos from list command in columns

Also add a LINKS column to easily view which services are linked to
which apps
This commit is contained in:
Loïc Guitaut
2015-10-08 23:44:26 +02:00
parent 95347a4fc4
commit 9f3ae5d078
2 changed files with 32 additions and 15 deletions

View File

@@ -9,15 +9,23 @@ teardown() {
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" l >&2
}
@test "($PLUGIN_COMMAND_PREFIX:list) with no exposed ports" {
@test "($PLUGIN_COMMAND_PREFIX:list) with no exposed ports, no linked apps" {
run dokku "$PLUGIN_COMMAND_PREFIX:list"
assert_contains "${lines[*]}" "l, redis:3.0.4 (running)"
assert_contains "${lines[*]}" "l redis:3.0.4 running - -"
}
@test "($PLUGIN_COMMAND_PREFIX:list) with exposed ports" {
dokku "$PLUGIN_COMMAND_PREFIX:expose" l 4242
run dokku "$PLUGIN_COMMAND_PREFIX:list"
assert_contains "${lines[*]}" "l, redis:3.0.4 (running), exposed port(s): 6379->4242"
assert_contains "${lines[*]}" "l redis:3.0.4 running 6379->4242 -"
}
@test "($PLUGIN_COMMAND_PREFIX:list) with linked app" {
dokku apps:create my_app
dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app
run dokku "$PLUGIN_COMMAND_PREFIX:list"
assert_contains "${lines[*]}" "l redis:3.0.4 running - my_app"
dokku --force apps:destroy my_app
}
@test "($PLUGIN_COMMAND_PREFIX:list) when there are no services" {