Merge pull request #9102 from dokku/missing-nginx-vhosts

fix: allow enabling nginx-vhosts when skipped at install
This commit is contained in:
Jose Diaz-Gonzalez authored and GitHub committed 2026-09-29 23:59:59 -04:00
commit 33b70abbf1
5 files changed
+61 -5

No files matched your search

+37
View File
@@ -9,9 +9,16 @@ setup() {
teardown() {
remove_test_plugin || true
restore_enter_plugin
global_teardown
}
restore_enter_plugin() {
declare desc="re-enables the enter core plugin if a test left it disabled"
[[ -e "$PLUGIN_CORE_PATH/enabled/enter" ]] || PLUGIN_PATH="$PLUGIN_CORE_PATH" plugn enable enter || true
[[ -e "$PLUGIN_ENABLED_PATH/enter" ]] || PLUGIN_PATH="$PLUGIN_PATH" plugn enable enter || true
}
@test "(plugin) plugin:help" {
run /bin/bash -c "dokku plugin"
echo "output: $output"
@@ -379,3 +386,33 @@ teardown() {
echo "status: $status"
assert_success
}
@test "(plugin:enable) core plugin skipped at install" {
run /bin/bash -c "rm $PLUGIN_ENABLED_PATH/enter $PLUGIN_CORE_PATH/enabled/enter"
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku plugin:list --format json | jq -r '.[] | select(.name == \"enter\") | .enabled'"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "false"
run /bin/bash -c "dokku plugin:enable enter"
echo "output: $output"
echo "status: $status"
assert_success
assert_output_contains "Plugin enter enabled"
run /bin/bash -c "dokku plugin:list --format json | jq -r '.[] | select(.name == \"enter\") | .enabled'"
echo "output: $output"
echo "status: $status"
assert_success
assert_output "true"
run /bin/bash -c "test -L $PLUGIN_CORE_PATH/enabled/enter"
echo "output: $output"
echo "status: $status"
assert_success
}