# HG changeset patch # User Mads Kiilerich # Date 2016-07-28 14:28:34 # Node ID 9358211ee1441de84d807115d5f5a12e9aa48bd1 # Parent 7c732f2047f8674393a72aae04c4644398ddae60 tests: move test data to top level 'data' folder - make grepping in kallithea/ easier We like to have test.ini under kallithea/tests, but we don't want the temporary files there. diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -16,7 +16,6 @@ syntax: regexp ^docs/build/ ^docs/_build/ ^data$ -^kallithea/tests/data$ ^sql_dumps/ ^\.settings$ ^\.project$ @@ -29,3 +28,4 @@ syntax: regexp ^fabfile.py ^\.idea$ ^\.cache$ +/__pycache__$ diff --git a/kallithea/tests/test.ini b/kallithea/tests/test.ini --- a/kallithea/tests/test.ini +++ b/kallithea/tests/test.ini @@ -179,8 +179,10 @@ static_files = true ## Available Languages: ## cs de fr hu ja nl_BE pl pt_BR ru sk zh_CN zh_TW lang = -cache_dir = %(here)s/data -index_dir = %(here)s/data/index +#cache_dir = %(here)s/data +cache_dir = %(here)s/../../data/test/cache +#index_dir = %(here)s/data/index +index_dir = %(here)s/../../data/test/index ## perform a full repository scan on each server start, this should be ## set to false after first startup, to allow faster server restarts. @@ -188,7 +190,8 @@ index_dir = %(here)s/data/index initial_repo_scan = true ## uncomment and set this path to use archive download cache -archive_cache_dir = %(here)s/tarballcache +#archive_cache_dir = %(here)s/tarballcache +archive_cache_dir = %(here)s/../../data/test/tarballcache ## change this to unique ID for security app_instance_uuid = test @@ -340,8 +343,10 @@ celery.always.eager = false ### BEAKER CACHE #### #################################### -beaker.cache.data_dir = %(here)s/data/cache/data -beaker.cache.lock_dir = %(here)s/data/cache/lock +#beaker.cache.data_dir = %(here)s/data/cache/data +beaker.cache.data_dir = %(here)s/../../data/test/cache/data +#beaker.cache.lock_dir = %(here)s/data/cache/lock +beaker.cache.lock_dir = %(here)s/../../data/test/cache/lock beaker.cache.regions = short_term,long_term,sql_cache_short diff --git a/scripts/generate-ini.py b/scripts/generate-ini.py --- a/scripts/generate-ini.py +++ b/scripts/generate-ini.py @@ -55,6 +55,11 @@ ini_files = [ 'show_revision_number': 'true', 'beaker.cache.sql_cache_short.expire': '1', 'beaker.session.secret': '{74e0cd75-b339-478b-b129-07dd221def1f}', + 'cache_dir': '%(here)s/../../data/test/cache', + 'index_dir': '%(here)s/../../data/test/index', + 'archive_cache_dir': '%(here)s/../../data/test/tarballcache', + 'beaker.cache.data_dir': '%(here)s/../../data/test/cache/data', + 'beaker.cache.lock_dir': '%(here)s/../../data/test/cache/lock', 'sqlalchemy.db1.url': 'sqlite:///%(here)s/kallithea_test.sqlite', }, '[logger_root]': {