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
6e8ae619
Commit
6e8ae619
authored
Jan 26, 2021
by
Quang-Minh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set a memory store for rack attack spec
parent
186aebe3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
spec/requests/rack_attack_global_spec.rb
spec/requests/rack_attack_global_spec.rb
+1
-1
spec/support/shared_examples/requests/rack_attack_shared_examples.rb
...t/shared_examples/requests/rack_attack_shared_examples.rb
+2
-2
No files found.
spec/requests/rack_attack_global_spec.rb
View file @
6e8ae619
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
'Rack Attack global throttles'
do
RSpec
.
describe
'Rack Attack global throttles'
,
:use_clean_rails_memory_store_caching
do
include
RackAttackSpecHelpers
let
(
:settings
)
{
Gitlab
::
CurrentSettings
.
current_application_settings
}
...
...
spec/support/shared_examples/requests/rack_attack_shared_examples.rb
View file @
6e8ae619
...
...
@@ -112,7 +112,7 @@ RSpec.shared_examples 'rate-limited token-authenticated requests' do
expect
(
response
).
not_to
have_gitlab_http_status
(
:too_many_requests
)
end
arguments
=
{
arguments
=
a_hash_including
(
{
message:
'Rack_Attack'
,
env: :throttle
,
remote_ip:
'127.0.0.1'
,
...
...
@@ -121,7 +121,7 @@ RSpec.shared_examples 'rate-limited token-authenticated requests' do
user_id:
user
.
id
,
'meta.user'
=>
user
.
username
,
matched:
throttle_types
[
throttle_setting_prefix
]
}
}
)
expect
(
Gitlab
::
AuthLogger
).
to
receive
(
:error
).
with
(
arguments
).
once
...
...
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