##// END OF EJS Templates
tests(core): made the test flag setting more flexible....
super-admin -
r5338:151d5696 default
parent child Browse files
Show More
@@ -21,3 +21,7 b' markers ='
21 21 skip_backends: Mark tests as skipped for given backends.
22 22 backends: Mark backends
23 23 dbs: database markers for running tests for given DB
24
25 env =
26 RC_TEST=1
27 RUN_ENV=test
@@ -11,6 +11,12 b' pytest-cov==4.0.0'
11 11 iniconfig==2.0.0
12 12 packaging==23.1
13 13 pluggy==1.0.0
14 pytest-env==1.1.3
15 pytest==7.3.1
16 attrs==22.2.0
17 iniconfig==2.0.0
18 packaging==23.1
19 pluggy==1.0.0
14 20 pytest-rerunfailures==12.0
15 21 pytest-profiling==1.7.0
16 22 gprof2dot==2022.7.29
@@ -87,5 +87,5 b' EXTENSIONS = {}'
87 87 __author__ = 'RhodeCode GmbH'
88 88 __url__ = 'https://code.rhodecode.com'
89 89
90 is_test = False
90 is_test = os.getenv('RC_TEST')
91 91 disable_error_handler = False
@@ -92,7 +92,6 b' def sanitize_settings_and_apply_defaults'
92 92
93 93 # Sanitize generic settings.
94 94 settings_maker.make_setting('default_encoding', 'UTF-8', parser='list')
95 settings_maker.make_setting('is_test', False, parser='bool')
96 95 settings_maker.make_setting('gzip_responses', False, parser='bool')
97 96 settings_maker.make_setting('startup.import_repos', 'false', parser='bool')
98 97
@@ -46,8 +46,7 b' def load_pyramid_environment(global_conf'
46 46 # If this is a test run we prepare the test environment like
47 47 # creating a test database, test search index and test repositories.
48 48 # This has to be done before the database connection is initialized.
49 if settings['is_test']:
50 rhodecode.is_test = True
49 if rhodecode.is_test:
51 50 rhodecode.disable_error_handler = True
52 51 from rhodecode import authentication
53 52 authentication.plugin_default_auth_ttl = 0
@@ -86,8 +86,7 b' class DBBackend(object):'
86 86 _store = os.path.dirname(os.path.abspath(__file__))
87 87 _type = None
88 88 _base_ini_config = [{'app:main': {'vcs.start_server': 'false',
89 'startup.import_repos': 'false',
90 'is_test': 'False'}}]
89 'startup.import_repos': 'false'}}]
91 90 _db_url = [{'app:main': {'sqlalchemy.db1.url': ''}}]
92 91 _base_db_name = 'rhodecode_test_db_backend'
93 92
General Comments 0
You need to be logged in to leave comments. Login now