diff options
author | Stan Hu <stanhu@gmail.com> | 2018-02-12 11:15:26 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-02-12 11:15:26 -0800 |
commit | d0f8c7f62ec8ffd205fb8a97fefc916b22b2f873 (patch) | |
tree | b492908d405abfff54e4d00615e7864a40e016ae | |
parent | 498ade4801a822f8704390b10d178af9fe7987cb (diff) | |
download | gitlab-ce-sh-disable-query-limiter.tar.gz |
Disable query limiting warnings for now on GitLab.comsh-disable-query-limiter
-rw-r--r-- | lib/gitlab/query_limiting.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/query_limiting_spec.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/query_limiting.rb b/lib/gitlab/query_limiting.rb index f64f1757144..9f69a9e4a39 100644 --- a/lib/gitlab/query_limiting.rb +++ b/lib/gitlab/query_limiting.rb @@ -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. diff --git a/spec/lib/gitlab/query_limiting_spec.rb b/spec/lib/gitlab/query_limiting_spec.rb index 2eddab0b8c3..c461753e39b 100644 --- a/spec/lib/gitlab/query_limiting_spec.rb +++ b/spec/lib/gitlab/query_limiting_spec.rb @@ -15,10 +15,10 @@ describe Gitlab::QueryLimiting do it 'returns true on GitLab.com' do allow(Gitlab).to receive(:com?).and_return(true) - expect(described_class.enable?).to eq(true) + expect(described_class.enable?).to eq(false) end - it 'returns true in a non GitLab.com' do + it 'returns false in a non GitLab.com' do expect(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) |