Skip to content

Commit d8c2656

Browse files
committed
fix: correct test case for :list command
1 parent ad0e0f6 commit d8c2656

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

tests/service_list.bats

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,13 @@ teardown() {
1010
}
1111

1212
@test "($PLUGIN_COMMAND_PREFIX:list) with no exposed ports, no linked apps" {
13-
run dokku "$PLUGIN_COMMAND_PREFIX:list"
14-
assert_contains "${lines[*]}" "l postgres:11.6 running - -"
15-
}
16-
17-
@test "($PLUGIN_COMMAND_PREFIX:list) with exposed ports" {
18-
dokku "$PLUGIN_COMMAND_PREFIX:expose" l 4242
19-
run dokku "$PLUGIN_COMMAND_PREFIX:list"
20-
assert_contains "${lines[*]}" "l postgres:11.6 running 5432->4242 -"
21-
}
22-
23-
@test "($PLUGIN_COMMAND_PREFIX:list) with linked app" {
24-
dokku apps:create my_app
25-
dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app
26-
run dokku "$PLUGIN_COMMAND_PREFIX:list"
27-
assert_contains "${lines[*]}" "l postgres:11.6 running - my_app"
28-
dokku --force apps:destroy my_app
13+
run dokku --quiet "$PLUGIN_COMMAND_PREFIX:list"
14+
assert_output "l"
2915
}
3016

3117
@test "($PLUGIN_COMMAND_PREFIX:list) when there are no services" {
3218
dokku --force "$PLUGIN_COMMAND_PREFIX:destroy" l
3319
run dokku "$PLUGIN_COMMAND_PREFIX:list"
34-
assert_contains "${lines[*]}" "There are no Postgres services"
20+
assert_output "${lines[*]}" "There are no $PLUGIN_SERVICE services"
3521
dokku "$PLUGIN_COMMAND_PREFIX:create" l
3622
}

0 commit comments

Comments
 (0)