summaryrefslogtreecommitdiff
path: root/spec/services/clusters/applications/schedule_update_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/clusters/applications/schedule_update_service_spec.rb')
-rw-r--r--spec/services/clusters/applications/schedule_update_service_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/services/clusters/applications/schedule_update_service_spec.rb b/spec/services/clusters/applications/schedule_update_service_spec.rb
index 01a75a334e6..2cbcb861938 100644
--- a/spec/services/clusters/applications/schedule_update_service_spec.rb
+++ b/spec/services/clusters/applications/schedule_update_service_spec.rb
@@ -10,6 +10,32 @@ RSpec.describe Clusters::Applications::ScheduleUpdateService do
freeze_time { example.run }
end
+ context 'when the application is a Clusters::Integrations::Prometheus' do
+ let(:application) { create(:clusters_integrations_prometheus) }
+
+ it 'does nothing' do
+ service = described_class.new(application, project)
+
+ expect(::ClusterUpdateAppWorker).not_to receive(:perform_in)
+ expect(::ClusterUpdateAppWorker).not_to receive(:perform_async)
+
+ service.execute
+ end
+ end
+
+ context 'when the application is externally installed' do
+ let(:application) { create(:clusters_applications_prometheus, :externally_installed) }
+
+ it 'does nothing' do
+ service = described_class.new(application, project)
+
+ expect(::ClusterUpdateAppWorker).not_to receive(:perform_in)
+ expect(::ClusterUpdateAppWorker).not_to receive(:perform_async)
+
+ service.execute
+ end
+ end
+
context 'when application is able to be updated' do
context 'when the application was recently scheduled' do
it 'schedules worker with a backoff delay' do