diff --git a/app/services/clusters/applications/update_service.rb b/app/services/clusters/applications/update_service.rb index 979d870cc94..a9d4e609992 100644 --- a/app/services/clusters/applications/update_service.rb +++ b/app/services/clusters/applications/update_service.rb @@ -6,7 +6,7 @@ module Clusters private def worker_class(application) - ClusterUpdateAppWorker + ClusterPatchAppWorker end def builders diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml index bc7db5669e1..b2d88567e0e 100644 --- a/app/workers/all_queues.yml +++ b/app/workers/all_queues.yml @@ -23,7 +23,7 @@ - cronjob:prune_web_hook_logs - gcp_cluster:cluster_install_app -- gcp_cluster:cluster_update_app +- gcp_cluster:cluster_patch_app - gcp_cluster:cluster_upgrade_app - gcp_cluster:cluster_provision - gcp_cluster:cluster_wait_for_app_installation diff --git a/app/workers/cluster_update_app_worker.rb b/app/workers/cluster_patch_app_worker.rb similarity index 90% rename from app/workers/cluster_update_app_worker.rb rename to app/workers/cluster_patch_app_worker.rb index bec422c34a9..0549e81ed05 100644 --- a/app/workers/cluster_update_app_worker.rb +++ b/app/workers/cluster_patch_app_worker.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class ClusterUpdateAppWorker +class ClusterPatchAppWorker include ApplicationWorker include ClusterQueue include ClusterApplications diff --git a/spec/controllers/groups/clusters/applications_controller_spec.rb b/spec/controllers/groups/clusters/applications_controller_spec.rb index 84da43fe2ef..16a63536ea6 100644 --- a/spec/controllers/groups/clusters/applications_controller_spec.rb +++ b/spec/controllers/groups/clusters/applications_controller_spec.rb @@ -105,7 +105,7 @@ describe Groups::Clusters::ApplicationsController do context "when cluster and app exists" do it "schedules an application update" do - expect(ClusterUpdateAppWorker).to receive(:perform_async).with(application.name, anything).once + expect(ClusterPatchAppWorker).to receive(:perform_async).with(application.name, anything).once is_expected.to have_http_status(:no_content) @@ -138,7 +138,7 @@ describe Groups::Clusters::ApplicationsController do describe 'security' do before do - allow(ClusterUpdateAppWorker).to receive(:perform_async) + allow(ClusterPatchAppWorker).to receive(:perform_async) end it_behaves_like 'a secure endpoint' diff --git a/spec/controllers/projects/clusters/applications_controller_spec.rb b/spec/controllers/projects/clusters/applications_controller_spec.rb index 247adf3f8c7..cd1a01f8acc 100644 --- a/spec/controllers/projects/clusters/applications_controller_spec.rb +++ b/spec/controllers/projects/clusters/applications_controller_spec.rb @@ -106,7 +106,7 @@ describe Projects::Clusters::ApplicationsController do context "when cluster and app exists" do it "schedules an application update" do - expect(ClusterUpdateAppWorker).to receive(:perform_async).with(application.name, anything).once + expect(ClusterPatchAppWorker).to receive(:perform_async).with(application.name, anything).once is_expected.to have_http_status(:no_content) @@ -139,7 +139,7 @@ describe Projects::Clusters::ApplicationsController do describe 'security' do before do - allow(ClusterUpdateAppWorker).to receive(:perform_async) + allow(ClusterPatchAppWorker).to receive(:perform_async) end it_behaves_like 'a secure endpoint' diff --git a/spec/features/projects/clusters/applications_spec.rb b/spec/features/projects/clusters/applications_spec.rb index 7eabcda286a..3784203a6b4 100644 --- a/spec/features/projects/clusters/applications_spec.rb +++ b/spec/features/projects/clusters/applications_spec.rb @@ -135,7 +135,7 @@ describe 'Clusters Applications', :js do it 'can then update the domain' do page.within('.js-cluster-application-row-knative') do - expect(ClusterUpdateAppWorker).to receive(:perform_async) + expect(ClusterPatchAppWorker).to receive(:perform_async) expect(domainname_form_value).to eq('domain.example.org') diff --git a/spec/services/clusters/applications/update_service_spec.rb b/spec/services/clusters/applications/update_service_spec.rb index 22ad698f77d..2d299882af0 100644 --- a/spec/services/clusters/applications/update_service_spec.rb +++ b/spec/services/clusters/applications/update_service_spec.rb @@ -14,12 +14,12 @@ describe Clusters::Applications::UpdateService do describe '#execute' do before do - allow(ClusterUpdateAppWorker).to receive(:perform_async) + allow(ClusterPatchAppWorker).to receive(:perform_async) end context 'application is not installed' do it 'raises Clusters::Applications::BaseService::InvalidApplicationError' do - expect(ClusterUpdateAppWorker).not_to receive(:perform_async) + expect(ClusterPatchAppWorker).not_to receive(:perform_async) expect { subject } .to raise_exception { Clusters::Applications::BaseService::InvalidApplicationError } @@ -46,8 +46,8 @@ describe Clusters::Applications::UpdateService do expect(application.reload).to be_scheduled end - it 'schedules ClusterUpdateAppWorker' do - expect(ClusterUpdateAppWorker).to receive(:perform_async) + it 'schedules ClusterPatchAppWorker' do + expect(ClusterPatchAppWorker).to receive(:perform_async) subject end @@ -59,7 +59,7 @@ describe Clusters::Applications::UpdateService do end it 'raises StateMachines::InvalidTransition' do - expect(ClusterUpdateAppWorker).not_to receive(:perform_async) + expect(ClusterPatchAppWorker).not_to receive(:perform_async) expect { subject } .to raise_exception { StateMachines::InvalidTransition }