# HG changeset patch # User domruf # Date 2017-03-23 19:04:21 # Node ID 28f631e2c75734ac2c12dd0d5b90e5a9694c867f # Parent 36f09fa6446ddd0864f7a9fabecd915406bf0420 tests: use the DB set in TEST_DB for git hooks Obviously the git hooks and the web app need to use the same database. Therefore, if the web app uses the TEST_DB environment variable, the git hooks needs to do the same. diff --git a/kallithea/lib/hooks.py b/kallithea/lib/hooks.py --- a/kallithea/lib/hooks.py +++ b/kallithea/lib/hooks.py @@ -392,7 +392,7 @@ def handle_git_receive(repo_path, revs, repo_path = safe_unicode(repo_path) path, ini_name = os.path.split(extras['config']) conf = appconfig('config:%s' % ini_name, relative_to=path) - load_environment(conf.global_conf, conf.local_conf, test_env=False, + conf = load_environment(conf.global_conf, conf.local_conf, test_env=False, test_index=False) engine = engine_from_config(conf, 'sqlalchemy.')