summaryrefslogtreecommitdiff
path: root/spec/workers/incident_management
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 15:07:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 15:07:45 +0000
commit1219a9dce91f4edbc135dfc08299b4122b4825a8 (patch)
treee7d12a55d75a2d56e60d9527bef3724e3578866d /spec/workers/incident_management
parent1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (diff)
downloadgitlab-ce-1219a9dce91f4edbc135dfc08299b4122b4825a8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/incident_management')
-rw-r--r--spec/workers/incident_management/process_prometheus_alert_worker_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/workers/incident_management/process_prometheus_alert_worker_spec.rb b/spec/workers/incident_management/process_prometheus_alert_worker_spec.rb
index 19ef2635882..5fbc39cad4e 100644
--- a/spec/workers/incident_management/process_prometheus_alert_worker_spec.rb
+++ b/spec/workers/incident_management/process_prometheus_alert_worker_spec.rb
@@ -60,7 +60,7 @@ describe IncidentManagement::ProcessPrometheusAlertWorker do
end
context 'when project could not be found' do
- let(:non_existing_project_id) { (Project.maximum(:id) || 0) + 1 }
+ let(:non_existing_project_id) { non_existing_record_id }
it 'does not create an issue' do
expect { subject.perform(non_existing_project_id, alert_params) }
@@ -75,7 +75,7 @@ describe IncidentManagement::ProcessPrometheusAlertWorker do
context 'when event could not be found' do
before do
- alert_params[:labels][:gitlab_alert_id] = (PrometheusAlertEvent.maximum(:id) || 0) + 1
+ alert_params[:labels][:gitlab_alert_id] = non_existing_record_id
end
it 'does not create an issue' do