Commit c1ecfb5d authored by Douwe Maan's avatar Douwe Maan

Disabling caching in test environment because it was causing issues with Markdown

parent adba37f9
...@@ -7,6 +7,8 @@ Gitlab::Application.configure do ...@@ -7,6 +7,8 @@ Gitlab::Application.configure do
# and recreated between test runs. Don't rely on the data there! # and recreated between test runs. Don't rely on the data there!
config.cache_classes = false config.cache_classes = false
config.cache_store = :null_store
# Configure static asset server for tests with Cache-Control for performance # Configure static asset server for tests with Cache-Control for performance
config.serve_static_assets = true config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600" config.static_cache_control = "public, max-age=3600"
......
...@@ -9,7 +9,10 @@ begin ...@@ -9,7 +9,10 @@ begin
rescue rescue
end end
Gitlab::Application.config.session_store( if Rails.env.test?
Gitlab::Application.config.session_store :cookie_store, key: "_gitlab_session"
else
Gitlab::Application.config.session_store(
:redis_store, # Using the cookie_store would enable session replay attacks. :redis_store, # Using the cookie_store would enable session replay attacks.
servers: Gitlab::Application.config.cache_store[1].merge(namespace: 'session:gitlab'), # re-use the Redis config from the Rails cache store servers: Gitlab::Application.config.cache_store[1].merge(namespace: 'session:gitlab'), # re-use the Redis config from the Rails cache store
key: '_gitlab_session', key: '_gitlab_session',
...@@ -17,4 +20,5 @@ Gitlab::Application.config.session_store( ...@@ -17,4 +20,5 @@ Gitlab::Application.config.session_store(
httponly: true, httponly: true,
expire_after: Settings.gitlab['session_expire_delay'] * 60, expire_after: Settings.gitlab['session_expire_delay'] * 60,
path: (Gitlab::Application.config.relative_url_root.nil?) ? '/' : Gitlab::Application.config.relative_url_root path: (Gitlab::Application.config.relative_url_root.nil?) ? '/' : Gitlab::Application.config.relative_url_root
) )
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment