BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
47b750a4
Commit
47b750a4
authored
Feb 12, 2018
by
Ian Baum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'sh-disable-query-limiter' into 'master'
Disable query limiting warnings for now on GitLab.com See merge request gitlab-org/gitlab-ce!17067
parent
e607fd79
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
query_limiting.rb
lib/gitlab/query_limiting.rb
+1
-1
query_limiting_spec.rb
spec/lib/gitlab/query_limiting_spec.rb
+6
-4
No files found.
lib/gitlab/query_limiting.rb
View file @
47b750a4
...
...
@@ -6,7 +6,7 @@ module Gitlab
# This ensures we don't produce any errors that users can't do anything
# about themselves.
def
self
.
enable?
Gitlab
.
com?
||
Rails
.
env
.
development?
||
Rails
.
env
.
test?
Rails
.
env
.
development?
||
Rails
.
env
.
test?
end
# Allows the current request to execute any number of SQL queries.
...
...
spec/lib/gitlab/query_limiting_spec.rb
View file @
47b750a4
...
...
@@ -12,14 +12,16 @@ describe Gitlab::QueryLimiting do
expect
(
described_class
.
enable?
).
to
eq
(
true
)
end
it
'returns true on GitLab.com'
do
it
'returns false on GitLab.com'
do
expect
(
Rails
.
env
).
to
receive
(
:development?
).
and_return
(
false
)
expect
(
Rails
.
env
).
to
receive
(
:test?
).
and_return
(
false
)
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
expect
(
described_class
.
enable?
).
to
eq
(
tru
e
)
expect
(
described_class
.
enable?
).
to
eq
(
fals
e
)
end
it
'returns
tru
e in a non GitLab.com'
do
expect
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
false
)
it
'returns
fals
e in a non GitLab.com'
do
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
false
)
expect
(
Rails
.
env
).
to
receive
(
:development?
).
and_return
(
false
)
expect
(
Rails
.
env
).
to
receive
(
:test?
).
and_return
(
false
)
...
...
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