mirror of
https://github.com/dokku/dokku.git
synced 2026-05-18 05:05:46 +02:00
test: invoke certs trigger tests via run_plugn_trigger helper
The new certs-set / certs-remove tests called plugn directly via /bin/bash -c, which exits with 'PLUGIN_PATH is not set in environment' under the bats runner. Route the calls through the existing run_plugn_trigger helper so the required PLUGIN_PATH / PLUGIN_CORE_AVAILABLE_PATH / DOKKU_LIB_ROOT vars are set.
This commit is contained in:
@@ -132,7 +132,7 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(certs) certs-set plugin trigger" {
|
||||
run /bin/bash -c "plugn trigger certs-set $TEST_APP $BATS_TMPDIR/tls/server.crt $BATS_TMPDIR/tls/server.key"
|
||||
run_plugn_trigger certs-set "$TEST_APP" "$BATS_TMPDIR/tls/server.crt" "$BATS_TMPDIR/tls/server.key"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -141,7 +141,7 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(certs) certs-set plugin trigger missing key file" {
|
||||
run /bin/bash -c "plugn trigger certs-set $TEST_APP $BATS_TMPDIR/tls/server.crt /nonexistent/server.key"
|
||||
run_plugn_trigger certs-set "$TEST_APP" "$BATS_TMPDIR/tls/server.crt" "/nonexistent/server.key"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
@@ -154,7 +154,7 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "plugn trigger certs-remove $TEST_APP"
|
||||
run_plugn_trigger certs-remove "$TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
@@ -162,7 +162,7 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(certs) certs-remove plugin trigger without endpoint" {
|
||||
run /bin/bash -c "plugn trigger certs-remove $TEST_APP"
|
||||
run_plugn_trigger certs-remove "$TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
|
||||
Reference in New Issue
Block a user