changeset 2683:eaf1782bee64 beta

add option to disable whoosh index in tests via an enviroment variable. - helps speed up testing, when whoosh is noot needed
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 03 Aug 2012 23:07:26 +0200
parents 63a980ac1bba
children 2b6939a77052
files rhodecode/config/environment.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/config/environment.py	Fri Aug 03 18:02:33 2012 +0200
+++ b/rhodecode/config/environment.py	Fri Aug 03 23:07:26 2012 +0200
@@ -79,7 +79,9 @@
         from rhodecode.lib.utils import create_test_env, create_test_index
         from rhodecode.tests import  TESTS_TMP_PATH
         create_test_env(TESTS_TMP_PATH, config)
-        create_test_index(TESTS_TMP_PATH, config, True)
+        # set RC_WHOOSH_TEST_DISABLE=1 to disable whoosh index during tests
+        if not int(os.environ.get('RC_WHOOSH_TEST_DISABLE', 0)):
+            create_test_index(TESTS_TMP_PATH, config, True)
 
     # MULTIPLE DB configs
     # Setup the SQLAlchemy database engine