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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1d5c9729
Commit
1d5c9729
authored
Mar 10, 2022
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setting the env var in spec_helper is not early enough
parent
3d5df5b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
config/environments/test.rb
config/environments/test.rb
+5
-0
spec/spec_helper.rb
spec/spec_helper.rb
+0
-7
No files found.
config/environments/test.rb
View file @
1d5c9729
...
@@ -6,6 +6,11 @@ require 'gitlab/testing/request_inspector_middleware'
...
@@ -6,6 +6,11 @@ require 'gitlab/testing/request_inspector_middleware'
require
'gitlab/testing/clear_process_memory_cache_middleware'
require
'gitlab/testing/clear_process_memory_cache_middleware'
require
'gitlab/utils'
require
'gitlab/utils'
# Set GITLAB_USE_MODEL_LOAD_BALANCING to a non-nil value
# CI tables consistently use the same connection
# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/82562
ENV
[
'GITLAB_USE_MODEL_LOAD_BALANCING'
]
||=
'true'
Rails
.
application
.
configure
do
Rails
.
application
.
configure
do
# Make sure the middleware is inserted first in middleware chain
# Make sure the middleware is inserted first in middleware chain
config
.
middleware
.
insert_before
(
ActionDispatch
::
Static
,
Gitlab
::
Testing
::
RequestBlockerMiddleware
)
config
.
middleware
.
insert_before
(
ActionDispatch
::
Static
,
Gitlab
::
Testing
::
RequestBlockerMiddleware
)
...
...
spec/spec_helper.rb
View file @
1d5c9729
...
@@ -264,14 +264,7 @@ RSpec.configure do |config|
...
@@ -264,14 +264,7 @@ RSpec.configure do |config|
stub_feature_flags
(
force_no_sharing_primary_model:
false
)
stub_feature_flags
(
force_no_sharing_primary_model:
false
)
end
end
# Set GITLAB_USE_MODEL_LOAD_BALANCING to a non-nil value
# so that feature, and request specs work with multiple databases
previous_value
=
ENV
[
'GITLAB_USE_MODEL_LOAD_BALANCING'
]
ENV
[
'GITLAB_USE_MODEL_LOAD_BALANCING'
]
||=
'true'
example
.
run
example
.
run
ENV
[
'GITLAB_USE_MODEL_LOAD_BALANCING'
]
=
previous_value
end
end
config
.
append_after
do
config
.
append_after
do
...
...
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