diff options
Diffstat (limited to 'spec/workers/cluster_update_app_worker_spec.rb')
-rw-r--r-- | spec/workers/cluster_update_app_worker_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/workers/cluster_update_app_worker_spec.rb b/spec/workers/cluster_update_app_worker_spec.rb index 8b8c1c82099..8f61ee17162 100644 --- a/spec/workers/cluster_update_app_worker_spec.rb +++ b/spec/workers/cluster_update_app_worker_spec.rb @@ -46,8 +46,19 @@ RSpec.describe ClusterUpdateAppWorker do subject.perform(application.name, application.id, project.id, Time.current) end + context 'application is externally installed' do + it 'does not execute PrometheusUpdateService' do + application = create(:clusters_applications_prometheus, :externally_installed) + + expect(prometheus_update_service).not_to receive(:execute) + + subject.perform(application.name, application.id, project.id, Time.current) + end + end + context 'with exclusive lease' do let_it_be(:user) { create(:user) } + let(:application) { create(:clusters_applications_prometheus, :installed) } let(:lease_key) { "#{described_class.name.underscore}-#{application.id}" } |