summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-06-28 10:03:10 +0000
committerThong Kuah <tkuah@gitlab.com>2019-06-28 10:03:10 +0000
commitbac5bfc7dc57e816685f3b8cfd94a4f56473dbc3 (patch)
treebfa4ad772794ea23ad35d9c9ab5097e646ffe55b /spec/support
parent2321b337f1487031e2cab8e1a4e778f3aaf8e2da (diff)
parent82c31a9addfe87e91b512abb982d2223fa4ed730 (diff)
downloadgitlab-ce-bac5bfc7dc57e816685f3b8cfd94a4f56473dbc3.tar.gz
Merge branch 'sh-support-subnets-ip-rate-limiter' into 'master'
Support CIDR notation in IP rate limiter See merge request gitlab-org/gitlab-ce!30146
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/stub_configuration.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/helpers/stub_configuration.rb b/spec/support/helpers/stub_configuration.rb
index 0d591f038ce..c372a3f0e49 100644
--- a/spec/support/helpers/stub_configuration.rb
+++ b/spec/support/helpers/stub_configuration.rb
@@ -95,6 +95,11 @@ module StubConfiguration
allow(Gitlab.config.gitlab_shell).to receive_messages(to_settings(messages))
end
+ def stub_rack_attack_setting(messages)
+ allow(Gitlab.config.rack_attack).to receive(:git_basic_auth).and_return(messages)
+ allow(Gitlab.config.rack_attack.git_basic_auth).to receive_messages(to_settings(messages))
+ end
+
private
# Modifies stubbed messages to also stub possible predicate versions