From 400d24f05f7f6871c08b7373f9ff82014f74f8da Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Fri, 11 Oct 2024 14:38:37 +0200 Subject: [PATCH] fix(tests): explicitly disable env_expand for test suite to prevent problems with DB connections during tests --- configs/development.ini | 3 +++ configs/production.ini | 3 +++ rhodecode/config/settings_maker.py | 3 +++ rhodecode/tests/rhodecode.ini | 16 ++++++++++++++++ 4 files changed, 25 insertions(+) diff --git a/configs/development.ini b/configs/development.ini index 77fd4cbf..b0f38a8d 100644 --- a/configs/development.ini +++ b/configs/development.ini @@ -71,6 +71,9 @@ use = egg:rhodecode-enterprise-ce ; enable proxy prefix middleware, defined above #filter-with = proxy-prefix +; control if environmental variables to be expanded into the .ini settings +#rhodecode.env_expand = true + ; ############# ; DEBUG OPTIONS ; ############# diff --git a/configs/production.ini b/configs/production.ini index 30840933..3dfd209f 100644 --- a/configs/production.ini +++ b/configs/production.ini @@ -71,6 +71,9 @@ use = egg:rhodecode-enterprise-ce ; enable proxy prefix middleware, defined above #filter-with = proxy-prefix +; control if environmental variables to be expanded into the .ini settings +#rhodecode.env_expand = true + ; encryption key used to encrypt social plugin tokens, ; remote_urls with credentials etc, if not set it defaults to ; `beaker.session.secret` diff --git a/rhodecode/config/settings_maker.py b/rhodecode/config/settings_maker.py index a82308dd..18b14d02 100644 --- a/rhodecode/config/settings_maker.py +++ b/rhodecode/config/settings_maker.py @@ -109,6 +109,9 @@ class SettingsMaker: return envvar_value def env_expand(self): + if self.settings.get('rhodecode.env_expand') == 'false': + return + replaced = {} for k, v in self.settings.items(): if k not in set_keys: diff --git a/rhodecode/tests/rhodecode.ini b/rhodecode/tests/rhodecode.ini index be936bb8..6e269065 100644 --- a/rhodecode/tests/rhodecode.ini +++ b/rhodecode/tests/rhodecode.ini @@ -71,6 +71,9 @@ use = egg:rhodecode-enterprise-ce ; enable proxy prefix middleware, defined above #filter-with = proxy-prefix +; control if environmental variables to be expanded into the .ini settings +rhodecode.env_expand = false + ; encryption key used to encrypt social plugin tokens, ; remote_urls with credentials etc, if not set it defaults to ; `beaker.session.secret` @@ -225,6 +228,13 @@ license_token = abra-cada-bra1-rce3 ; This flag hides sensitive information on the license page such as token, and license data license.hide_license_info = false +; Import EE license from this license path +#license.import_path = %(here)s/rhodecode_enterprise.license + +; import license 'if-missing' or 'force' (always override) +; if-missing means apply license if it doesn't exist. 'force' option always overrides it +license.import_path_mode = if-missing + ; supervisor connection uri, for managing supervisor and logs. supervisor.uri = @@ -658,6 +668,12 @@ vcs.connection_timeout = 3600 ; It uses cache_region `cache_repo` vcs.methods.cache = false +; Filesystem location where Git lfs objects should be stored +vcs.git.lfs.storage_location = /var/opt/rhodecode_repo_store/.cache/git_lfs_store + +; Filesystem location where Mercurial largefile objects should be stored +vcs.hg.largefiles.storage_location = /var/opt/rhodecode_repo_store/.cache/hg_largefiles_store + ; #################################################### ; Subversion proxy support (mod_dav_svn) ; Maps RhodeCode repo groups into SVN paths for Apache