Commit 9e0d443f authored by Valery Sizov's avatar Valery Sizov

Disabling cache for test environment

parent 5be2191b
...@@ -30,4 +30,6 @@ Gitlab::Application.configure do ...@@ -30,4 +30,6 @@ Gitlab::Application.configure do
config.active_support.deprecation = :stderr config.active_support.deprecation = :stderr
config.eager_load = false config.eager_load = false
config.cache_store = :null_store
end end
...@@ -9,12 +9,14 @@ begin ...@@ -9,12 +9,14 @@ begin
rescue rescue
end end
Gitlab::Application.config.session_store( unless Rails.env.test?
:redis_store, # Using the cookie_store would enable session replay attacks. Gitlab::Application.config.session_store(
servers: Gitlab::Application.config.cache_store[1].merge(namespace: 'session:gitlab'), # re-use the Redis config from the Rails cache store :redis_store, # Using the cookie_store would enable session replay attacks.
key: '_gitlab_session', servers: Gitlab::Application.config.cache_store[1].merge(namespace: 'session:gitlab'), # re-use the Redis config from the Rails cache store
secure: Gitlab.config.gitlab.https, key: '_gitlab_session',
httponly: true, secure: Gitlab.config.gitlab.https,
expire_after: Settings.gitlab['session_expire_delay'] * 60, httponly: true,
path: (Gitlab::Application.config.relative_url_root.nil?) ? '/' : Gitlab::Application.config.relative_url_root expire_after: Settings.gitlab['session_expire_delay'] * 60,
) 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