Changeset - dc960653f8d2
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 14 years ago 2011-06-29 00:41:51
marcin@python-works.com
Added new random directory for each test to be better sandboxed
2 files changed with 7 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/utils.py
Show inline comments
 
@@ -514,6 +514,11 @@ def create_test_env(repos_test_path, con
 
    dbconf = config['sqlalchemy.db1.url']
 
    log.debug('making test db %s', dbconf)
 

	
 
    # create test dir if it doesn't exist
 
    if not os.path.isdir(repos_test_path):
 
        log.debug('Creating testdir %s' % repos_test_path)
 
        os.makedirs(repos_test_path)
 

	
 
    dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=config['here'],
 
                        tests=True)
 
    dbmanage.create_tables(override=True)
rhodecode/tests/__init__.py
Show inline comments
 
@@ -38,8 +38,8 @@ __all__ = ['environ', 'url', 'TestContro
 
environ = {}
 

	
 
#SOME GLOBALS FOR TESTS
 
TESTS_TMP_PATH = jn('/', 'tmp')
 

	
 
from tempfile import _RandomNameSequence
 
TESTS_TMP_PATH = jn('/', 'tmp', 'rc_test_%s' % _RandomNameSequence().next())
 
HG_REPO = 'vcs_test_hg'
 
GIT_REPO = 'vcs_test_git'
 

	
0 comments (0 inline, 0 general)