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
c1a9e22b
Commit
c1a9e22b
authored
Nov 10, 2021
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set issues_create_limit lower to reduce flakiness
parent
63676cf6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
+9
-10
ee/spec/controllers/groups/epics_controller_spec.rb
ee/spec/controllers/groups/epics_controller_spec.rb
+3
-4
spec/controllers/projects/issues_controller_spec.rb
spec/controllers/projects/issues_controller_spec.rb
+3
-3
spec/lib/gitlab/email/handler/service_desk_handler_spec.rb
spec/lib/gitlab/email/handler/service_desk_handler_spec.rb
+1
-1
spec/services/issues/create_service_spec.rb
spec/services/issues/create_service_spec.rb
+2
-2
No files found.
ee/spec/controllers/groups/epics_controller_spec.rb
View file @
c1a9e22b
...
...
@@ -495,13 +495,12 @@ RSpec.describe Groups::EpicsController do
context
'when the endpoint receives requests above the limit'
,
:freeze_time
,
:clean_gitlab_redis_rate_limiting
do
before
do
stub_application_setting
(
issues_create_limit:
5
)
stub_application_setting
(
issues_create_limit:
1
)
end
it
'prevents from creating more epics'
do
5
.
times
{
post
:create
,
params:
{
group_id:
group
,
epic:
{
title:
'new epic'
,
description:
'description'
}
}
}
2
.
times
{
post
:create
,
params:
{
group_id:
group
,
epic:
{
title:
'new epic'
,
description:
'description'
}
}
}
post
:create
,
params:
{
group_id:
group
,
epic:
{
title:
'new epic'
,
description:
'description'
}
}
expect
(
response
.
body
).
to
eq
(
_
(
'This endpoint has been requested too many times. Try again later.'
))
expect
(
response
).
to
have_gitlab_http_status
(
:too_many_requests
)
end
...
...
@@ -519,7 +518,7 @@ RSpec.describe Groups::EpicsController do
expect
(
Gitlab
::
AuthLogger
).
to
receive
(
:error
).
with
(
attributes
).
once
6
.
times
{
post
:create
,
params:
{
group_id:
group
,
epic:
{
title:
'new epic'
,
description:
'description'
}
}
}
2
.
times
{
post
:create
,
params:
{
group_id:
group
,
epic:
{
title:
'new epic'
,
description:
'description'
}
}
}
end
end
end
...
...
spec/controllers/projects/issues_controller_spec.rb
View file @
c1a9e22b
...
...
@@ -1410,12 +1410,12 @@ RSpec.describe Projects::IssuesController do
context
'when the endpoint receives requests above the limit'
,
:freeze_time
,
:clean_gitlab_redis_rate_limiting
do
before
do
stub_application_setting
(
issues_create_limit:
5
)
stub_application_setting
(
issues_create_limit:
1
)
end
context
'when issue creation limits imposed'
do
it
'prevents from creating more issues'
,
:request_store
do
5
.
times
{
post_new_issue
}
post_new_issue
expect
{
post_new_issue
}
.
to
change
{
Gitlab
::
GitalyClient
.
get_request_count
}.
by
(
1
)
# creates 1 projects and 0 issues
...
...
@@ -1442,7 +1442,7 @@ RSpec.describe Projects::IssuesController do
project
.
add_developer
(
user
)
sign_in
(
user
)
6
.
times
do
2
.
times
do
post
:create
,
params:
{
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
,
...
...
spec/lib/gitlab/email/handler/service_desk_handler_spec.rb
View file @
c1a9e22b
...
...
@@ -298,7 +298,7 @@ RSpec.describe Gitlab::Email::Handler::ServiceDeskHandler do
context
'when limit is higher than sent emails'
do
before
do
stub_application_setting
(
issues_create_limit:
3
)
stub_application_setting
(
issues_create_limit:
2
)
end
it
'creates 2 issues'
do
...
...
spec/services/issues/create_service_spec.rb
View file @
c1a9e22b
...
...
@@ -329,9 +329,9 @@ RSpec.describe Issues::CreateService do
end
end
context
'when limit is higher than coun
f
of issues being created'
do
context
'when limit is higher than coun
t
of issues being created'
do
before
do
stub_application_setting
(
issues_create_limit:
3
)
stub_application_setting
(
issues_create_limit:
2
)
end
it
'creates 2 issues'
do
...
...
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