From 2b963884b42175f6965468f9c534cc86d43ee761 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 12 May 2026 20:21:07 -0400 Subject: [PATCH] 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. --- tests/unit/certs.bats | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/certs.bats b/tests/unit/certs.bats index c4ecd2916..042553725 100644 --- a/tests/unit/certs.bats +++ b/tests/unit/certs.bats @@ -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