Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-11 02:02:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-11 02:02:09 +0300
commit8c21e23045073c07c43f4f4d9012ced728702e98 (patch)
treea14b5f617927e4f3419e599967eab727f4755491 /spec/services
parent0a3f1f55493660acfabd198d2e1649a881d8852b (diff)
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/alert_management/process_prometheus_alert_service_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/alert_management/process_prometheus_alert_service_spec.rb b/spec/services/alert_management/process_prometheus_alert_service_spec.rb
index 0ce88f6b5b7..533e2473cb8 100644
--- a/spec/services/alert_management/process_prometheus_alert_service_spec.rb
+++ b/spec/services/alert_management/process_prometheus_alert_service_spec.rb
@@ -83,6 +83,15 @@ RSpec.describe AlertManagement::ProcessPrometheusAlertService do
context 'when alert does not exist' do
context 'when alert can be created' do
it_behaves_like 'creates an alert management alert'
+
+ it 'processes the incident alert' do
+ expect(IncidentManagement::ProcessAlertWorker)
+ .to receive(:perform_async)
+ .with(nil, nil, kind_of(Integer))
+ .once
+
+ expect(subject).to be_success
+ end
end
context 'when alert cannot be created' do
@@ -102,6 +111,13 @@ RSpec.describe AlertManagement::ProcessPrometheusAlertService do
execute
end
+
+ it 'does not create incident issue' do
+ expect(IncidentManagement::ProcessAlertWorker)
+ .not_to receive(:perform_async)
+
+ expect(subject).to be_success
+ end
end
it { is_expected.to be_success }