Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
c1ecfb5d
Commit
c1ecfb5d
authored
Oct 22, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disabling caching in test environment because it was causing issues with Markdown
parent
adba37f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
config/environments/test.rb
config/environments/test.rb
+2
-0
config/initializers/session_store.rb
config/initializers/session_store.rb
+13
-9
No files found.
config/environments/test.rb
View file @
c1ecfb5d
...
...
@@ -7,6 +7,8 @@ Gitlab::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_assets
=
true
config
.
static_cache_control
=
"public, max-age=3600"
...
...
config/initializers/session_store.rb
View file @
c1ecfb5d
...
...
@@ -9,12 +9,16 @@ begin
rescue
end
Gitlab
::
Application
.
config
.
session_store
(
: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
key:
'_gitlab_session'
,
secure:
Gitlab
.
config
.
gitlab
.
https
,
httponly:
true
,
expire_after:
Settings
.
gitlab
[
'session_expire_delay'
]
*
60
,
path:
(
Gitlab
::
Application
.
config
.
relative_url_root
.
nil?
)
?
'/'
:
Gitlab
::
Application
.
config
.
relative_url_root
)
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:
Gitlab
::
Application
.
config
.
cache_store
[
1
].
merge
(
namespace:
'session:gitlab'
),
# re-use the Redis config from the Rails cache store
key:
'_gitlab_session'
,
secure:
Gitlab
.
config
.
gitlab
.
https
,
httponly:
true
,
expire_after:
Settings
.
gitlab
[
'session_expire_delay'
]
*
60
,
path:
(
Gitlab
::
Application
.
config
.
relative_url_root
.
nil?
)
?
'/'
:
Gitlab
::
Application
.
config
.
relative_url_root
)
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment