diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-06-28 10:03:10 +0000 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-06-28 10:03:10 +0000 |
commit | bac5bfc7dc57e816685f3b8cfd94a4f56473dbc3 (patch) | |
tree | bfa4ad772794ea23ad35d9c9ab5097e646ffe55b /spec/support | |
parent | 2321b337f1487031e2cab8e1a4e778f3aaf8e2da (diff) | |
parent | 82c31a9addfe87e91b512abb982d2223fa4ed730 (diff) | |
download | gitlab-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.rb | 5 |
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 |