summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2023-12-17 15:05:47 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2023-12-17 15:05:47 +0000
commite566e60e51a740387261a06fe800fefece750fb1 (patch)
tree5cd940235f90af265d85573518f25a8beebe1bc2 /config
parent4cc0b8d2ca80f4de3a0217184e9ef982f2407c05 (diff)
downloadredmine-e566e60e51a740387261a06fe800fefece750fb1.tar.gz
redmine-e566e60e51a740387261a06fe800fefece750fb1.zip
Adds test for plugin autoload issue (#36320, #39834).
Patch by @tohosaku. git-svn-id: https://svn.redmine.org/redmine/trunk@22522 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config')
-rw-r--r--config/application.rb3
-rw-r--r--config/environments/test.rb6
2 files changed, 9 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb
index 48e855c9b..f3b6e82fd 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -85,6 +85,9 @@ module RedmineApp
# for more options (same options as config.cache_store).
config.redmine_search_cache_store = :memory_store
+ # Sets default plugin directory
+ config.redmine_plugins_directory = 'plugins'
+
# Configure log level here so that additional environment file
# can change it (environments/ENV.rb would take precedence over it)
config.log_level = Rails.env.production? ? :info : :debug
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 2e7b23813..ea6080ac7 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -18,6 +18,12 @@ Rails.application.configure do
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
+ # Change default plugins dir if env variable is present
+ # This is used by redmine plugins autoload test.
+ if ENV["REDMINE_PLUGINS_DIRECTORY"].present?
+ config.redmine_plugins_directory = ENV["REDMINE_PLUGINS_DIRECTORY"]
+ end
+
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {