summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2015-12-08 20:22:23 +0000
committerRobert Speicher <robert@gitlab.com>2015-12-08 20:22:23 +0000
commitbcd89a58e736685bcce662fe0acf793ee925b536 (patch)
treed38abe907bf3d9d9591227d627c2b25bb4a2720c /config
parent02cc978ebc0650284b2b7b0bd4cf0bc633ab788e (diff)
parent926c3bef9fbda49d5cab268bcd83355142e945c1 (diff)
downloadgitlab-ce-bcd89a58e736685bcce662fe0acf793ee925b536.tar.gz
Merge branch 'reference-pipeline-and-caching' into 'master'
Implement different Markdown rendering pipelines and cache Markdown Builds on !1090. Related to !1014. Fixes #2054. See merge request !1602
Diffstat (limited to 'config')
-rw-r--r--config/environments/test.rb2
-rw-r--r--config/initializers/session_store.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/config/environments/test.rb b/config/environments/test.rb
index f96ac6f9753..d6842affa6c 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -7,6 +7,8 @@ Rails.application.configure do
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = false
+ config.cache_store = :null_store
+
# Configure static asset server for tests with Cache-Control for performance
config.serve_static_files = true
config.static_cache_control = "public, max-age=3600"
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index d5208b8c93e..0fc725842ba 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -10,7 +10,9 @@ rescue
Settings.gitlab['session_expire_delay'] ||= 10080
end
-unless Rails.env.test?
+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.
servers: Rails.application.config.cache_store[1].merge(namespace: 'session:gitlab'), # re-use the Redis config from the Rails cache store