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
ccf3b752
Commit
ccf3b752
authored
Mar 03, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix several ID-dependent specs
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
eda4dc77
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
ee/spec/workers/incident_management/process_prometheus_alert_worker_spec.rb
...cident_management/process_prometheus_alert_worker_spec.rb
+6
-4
No files found.
ee/spec/workers/incident_management/process_prometheus_alert_worker_spec.rb
View file @
ccf3b752
...
...
@@ -59,21 +59,23 @@ describe IncidentManagement::ProcessPrometheusAlertWorker do
end
end
context
'when project could not be found'
,
quarantine:
'https://gitlab.com/gitlab-org/gitlab/issues/208766'
do
context
'when project could not be found'
do
let
(
:non_existing_project_id
)
{
(
Project
.
maximum
(
:id
)
||
0
)
+
1
}
it
'does not create an issue'
do
expect
{
subject
.
perform
(
'1234'
,
alert_params
)
}
expect
{
subject
.
perform
(
non_existing_project_id
,
alert_params
)
}
.
not_to
change
(
Issue
,
:count
)
end
it
'does not relate issue to an event'
do
expect
{
subject
.
perform
(
'1234'
,
alert_params
)
}
expect
{
subject
.
perform
(
non_existing_project_id
,
alert_params
)
}
.
not_to
change
(
prometheus_alert
.
related_issues
,
:count
)
end
end
context
'when event could not be found'
do
before
do
alert_params
[
:labels
][
:gitlab_alert_id
]
=
'1234'
alert_params
[
:labels
][
:gitlab_alert_id
]
=
(
PrometheusAlertEvent
.
maximum
(
:id
)
||
0
)
+
1
end
it
'does not create an issue'
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