summaryrefslogtreecommitdiff
path: root/spec/services/clusters
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/clusters')
-rw-r--r--spec/services/clusters/applications/install_service_spec.rb6
-rw-r--r--spec/services/clusters/applications/patch_service_spec.rb6
-rw-r--r--spec/services/clusters/applications/upgrade_service_spec.rb6
3 files changed, 6 insertions, 12 deletions
diff --git a/spec/services/clusters/applications/install_service_spec.rb b/spec/services/clusters/applications/install_service_spec.rb
index 494c5892210..9e1ae5e8742 100644
--- a/spec/services/clusters/applications/install_service_spec.rb
+++ b/spec/services/clusters/applications/install_service_spec.rb
@@ -60,7 +60,7 @@ describe Clusters::Applications::InstallService do
let(:error) { StandardError.new('something bad happened') }
before do
- expect(application).to receive(:make_installing!).once.and_raise(error)
+ expect(helm_client).to receive(:install).with(install_command).and_raise(error)
end
include_examples 'logs kubernetes errors' do
@@ -70,12 +70,10 @@ describe Clusters::Applications::InstallService do
end
it 'make the application errored' do
- expect(helm_client).not_to receive(:install)
-
service.execute
expect(application).to be_errored
- expect(application.status_reason).to eq("Can't start installation process.")
+ expect(application.status_reason).to eq('Failed to install.')
end
end
end
diff --git a/spec/services/clusters/applications/patch_service_spec.rb b/spec/services/clusters/applications/patch_service_spec.rb
index 10b1379a127..3ebe0540837 100644
--- a/spec/services/clusters/applications/patch_service_spec.rb
+++ b/spec/services/clusters/applications/patch_service_spec.rb
@@ -66,16 +66,14 @@ describe Clusters::Applications::PatchService do
end
before do
- expect(application).to receive(:make_updating!).once.and_raise(error)
+ expect(helm_client).to receive(:update).with(update_command).and_raise(error)
end
it 'make the application errored' do
- expect(helm_client).not_to receive(:update)
-
service.execute
expect(application).to be_update_errored
- expect(application.status_reason).to eq("Can't start update process.")
+ expect(application.status_reason).to eq('Failed to update.')
end
end
end
diff --git a/spec/services/clusters/applications/upgrade_service_spec.rb b/spec/services/clusters/applications/upgrade_service_spec.rb
index dd2e6e94e4f..a80b1d9127c 100644
--- a/spec/services/clusters/applications/upgrade_service_spec.rb
+++ b/spec/services/clusters/applications/upgrade_service_spec.rb
@@ -60,7 +60,7 @@ describe Clusters::Applications::UpgradeService do
let(:error) { StandardError.new('something bad happened') }
before do
- expect(application).to receive(:make_updating!).once.and_raise(error)
+ expect(helm_client).to receive(:update).with(install_command).and_raise(error)
end
include_examples 'logs kubernetes errors' do
@@ -70,12 +70,10 @@ describe Clusters::Applications::UpgradeService do
end
it 'make the application errored' do
- expect(helm_client).not_to receive(:update)
-
service.execute
expect(application).to be_update_errored
- expect(application.status_reason).to eq("Can't start upgrade process.")
+ expect(application.status_reason).to eq('Failed to upgrade.')
end
end
end