Commit 3bdff7aa authored by João Cunha's avatar João Cunha

Rename ClusterUpdateAppWorker to ClusterPatchAppWorker

- This is to avoid colision with EE ClusterUpdateAppWorker
parent 5e6e1dd5
...@@ -6,7 +6,7 @@ module Clusters ...@@ -6,7 +6,7 @@ module Clusters
private private
def worker_class(application) def worker_class(application)
ClusterUpdateAppWorker ClusterPatchAppWorker
end end
def builders def builders
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
- cronjob:prune_web_hook_logs - cronjob:prune_web_hook_logs
- gcp_cluster:cluster_install_app - gcp_cluster:cluster_install_app
- gcp_cluster:cluster_update_app - gcp_cluster:cluster_patch_app
- gcp_cluster:cluster_upgrade_app - gcp_cluster:cluster_upgrade_app
- gcp_cluster:cluster_provision - gcp_cluster:cluster_provision
- gcp_cluster:cluster_wait_for_app_installation - gcp_cluster:cluster_wait_for_app_installation
......
# frozen_string_literal: true # frozen_string_literal: true
class ClusterUpdateAppWorker class ClusterPatchAppWorker
include ApplicationWorker include ApplicationWorker
include ClusterQueue include ClusterQueue
include ClusterApplications include ClusterApplications
......
...@@ -105,7 +105,7 @@ describe Groups::Clusters::ApplicationsController do ...@@ -105,7 +105,7 @@ describe Groups::Clusters::ApplicationsController do
context "when cluster and app exists" do context "when cluster and app exists" do
it "schedules an application update" 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) is_expected.to have_http_status(:no_content)
...@@ -138,7 +138,7 @@ describe Groups::Clusters::ApplicationsController do ...@@ -138,7 +138,7 @@ describe Groups::Clusters::ApplicationsController do
describe 'security' do describe 'security' do
before do before do
allow(ClusterUpdateAppWorker).to receive(:perform_async) allow(ClusterPatchAppWorker).to receive(:perform_async)
end end
it_behaves_like 'a secure endpoint' it_behaves_like 'a secure endpoint'
......
...@@ -106,7 +106,7 @@ describe Projects::Clusters::ApplicationsController do ...@@ -106,7 +106,7 @@ describe Projects::Clusters::ApplicationsController do
context "when cluster and app exists" do context "when cluster and app exists" do
it "schedules an application update" 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) is_expected.to have_http_status(:no_content)
...@@ -139,7 +139,7 @@ describe Projects::Clusters::ApplicationsController do ...@@ -139,7 +139,7 @@ describe Projects::Clusters::ApplicationsController do
describe 'security' do describe 'security' do
before do before do
allow(ClusterUpdateAppWorker).to receive(:perform_async) allow(ClusterPatchAppWorker).to receive(:perform_async)
end end
it_behaves_like 'a secure endpoint' it_behaves_like 'a secure endpoint'
......
...@@ -135,7 +135,7 @@ describe 'Clusters Applications', :js do ...@@ -135,7 +135,7 @@ describe 'Clusters Applications', :js do
it 'can then update the domain' do it 'can then update the domain' do
page.within('.js-cluster-application-row-knative') 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') expect(domainname_form_value).to eq('domain.example.org')
......
...@@ -14,12 +14,12 @@ describe Clusters::Applications::UpdateService do ...@@ -14,12 +14,12 @@ describe Clusters::Applications::UpdateService do
describe '#execute' do describe '#execute' do
before do before do
allow(ClusterUpdateAppWorker).to receive(:perform_async) allow(ClusterPatchAppWorker).to receive(:perform_async)
end end
context 'application is not installed' do context 'application is not installed' do
it 'raises Clusters::Applications::BaseService::InvalidApplicationError' do it 'raises Clusters::Applications::BaseService::InvalidApplicationError' do
expect(ClusterUpdateAppWorker).not_to receive(:perform_async) expect(ClusterPatchAppWorker).not_to receive(:perform_async)
expect { subject } expect { subject }
.to raise_exception { Clusters::Applications::BaseService::InvalidApplicationError } .to raise_exception { Clusters::Applications::BaseService::InvalidApplicationError }
...@@ -46,8 +46,8 @@ describe Clusters::Applications::UpdateService do ...@@ -46,8 +46,8 @@ describe Clusters::Applications::UpdateService do
expect(application.reload).to be_scheduled expect(application.reload).to be_scheduled
end end
it 'schedules ClusterUpdateAppWorker' do it 'schedules ClusterPatchAppWorker' do
expect(ClusterUpdateAppWorker).to receive(:perform_async) expect(ClusterPatchAppWorker).to receive(:perform_async)
subject subject
end end
...@@ -59,7 +59,7 @@ describe Clusters::Applications::UpdateService do ...@@ -59,7 +59,7 @@ describe Clusters::Applications::UpdateService do
end end
it 'raises StateMachines::InvalidTransition' do it 'raises StateMachines::InvalidTransition' do
expect(ClusterUpdateAppWorker).not_to receive(:perform_async) expect(ClusterPatchAppWorker).not_to receive(:perform_async)
expect { subject } expect { subject }
.to raise_exception { StateMachines::InvalidTransition } .to raise_exception { StateMachines::InvalidTransition }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment