From 3ede845f0cddbda0e10f632817ee00c147fc775b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 20 Feb 2023 23:51:28 -0500 Subject: [PATCH] tests: add test for --no-restart to link tests --- tests/service_link.bats | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/service_link.bats b/tests/service_link.bats index 9b4c6c7..dd10d08 100755 --- a/tests/service_link.bats +++ b/tests/service_link.bats @@ -116,3 +116,19 @@ teardown() { assert_success dokku "$PLUGIN_COMMAND_PREFIX:unlink" ls my-app } + +@test "($PLUGIN_COMMAND_PREFIX:unlink) respects --no-restart" { + run dokku "$PLUGIN_COMMAND_PREFIX:link" ls my-app --no-restart + assert_output_contains "Restarting app my-app" 1 + assert_success + + run dokku "$PLUGIN_COMMAND_PREFIX:unlink" ls my-app + assert_success + + run dokku "$PLUGIN_COMMAND_PREFIX:link" ls my-app --no-restart + assert_output_contains "Restarting app my-app" 0 + assert_success + + run dokku "$PLUGIN_COMMAND_PREFIX:unlink" ls my-app + assert_success +}