##// END OF EJS Templates
fix(tests): fixed db migration tests after introduction of RC_TEST flag
super-admin -
r5351:adc169b4 default
parent child Browse files
Show More
@@ -87,5 +87,5 b' EXTENSIONS = {}'
87 87 __author__ = 'RhodeCode GmbH'
88 88 __url__ = 'https://code.rhodecode.com'
89 89
90 is_test = os.getenv('RC_TEST')
90 is_test = os.getenv('RC_TEST', '0') == '1'
91 91 disable_error_handler = False
@@ -89,6 +89,7 b' class DBBackend(object):'
89 89 'startup.import_repos': 'false'}}]
90 90 _db_url = [{'app:main': {'sqlalchemy.db1.url': ''}}]
91 91 _base_db_name = 'rhodecode_test_db_backend'
92 std_env = {'RC_TEST': '0'}
92 93
93 94 def __init__(
94 95 self, config_file, db_name=None, basetemp=None,
@@ -134,13 +135,15 b' class DBBackend(object):'
134 135 """
135 136
136 137 command = cmd + ' ' + ' '.join(args)
137 sys.stdout.write(command)
138 sys.stdout.write(f'CMD: {command}')
138 139
139 140 # Tell Python to use UTF-8 encoding out stdout
140 141 _env = os.environ.copy()
141 142 _env['PYTHONIOENCODING'] = 'UTF-8'
143 _env.update(self.std_env)
142 144 if env:
143 145 _env.update(env)
146
144 147 self.p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, env=_env)
145 148 self.stdout, self.stderr = self.p.communicate()
146 149 stdout_str = safe_str(self.stdout)
General Comments 0
You need to be logged in to leave comments. Login now