diff options
Diffstat (limited to 'spec/services/clusters/applications/uninstall_service_spec.rb')
-rw-r--r-- | spec/services/clusters/applications/uninstall_service_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/services/clusters/applications/uninstall_service_spec.rb b/spec/services/clusters/applications/uninstall_service_spec.rb index d1d0e923e18..16497d752b2 100644 --- a/spec/services/clusters/applications/uninstall_service_spec.rb +++ b/spec/services/clusters/applications/uninstall_service_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Clusters::Applications::UninstallService, '#execute' do - let(:application) { create(:clusters_applications_helm, :scheduled) } + let(:application) { create(:clusters_applications_prometheus, :scheduled) } let(:service) { described_class.new(application) } let(:helm_client) { instance_double(Gitlab::Kubernetes::Helm::Api) } let(:worker_class) { Clusters::Applications::WaitForUninstallAppWorker } @@ -14,7 +14,7 @@ describe Clusters::Applications::UninstallService, '#execute' do context 'when there are no errors' do before do - expect(helm_client).to receive(:uninstall).with(kind_of(Gitlab::Kubernetes::Helm::ResetCommand)) + expect(helm_client).to receive(:uninstall).with(kind_of(Gitlab::Kubernetes::Helm::DeleteCommand)) allow(worker_class).to receive(:perform_in).and_return(nil) end @@ -36,7 +36,7 @@ describe Clusters::Applications::UninstallService, '#execute' do let(:error) { Kubeclient::HttpError.new(500, 'system failure', nil) } before do - expect(helm_client).to receive(:uninstall).with(kind_of(Gitlab::Kubernetes::Helm::ResetCommand)).and_raise(error) + expect(helm_client).to receive(:uninstall).with(kind_of(Gitlab::Kubernetes::Helm::DeleteCommand)).and_raise(error) end include_examples 'logs kubernetes errors' do @@ -54,11 +54,11 @@ describe Clusters::Applications::UninstallService, '#execute' do end context 'a non kubernetes error happens' do - let(:application) { create(:clusters_applications_helm, :scheduled) } + let(:application) { create(:clusters_applications_prometheus, :scheduled) } let(:error) { StandardError.new('something bad happened') } before do - expect(helm_client).to receive(:uninstall).with(kind_of(Gitlab::Kubernetes::Helm::ResetCommand)).and_raise(error) + expect(helm_client).to receive(:uninstall).with(kind_of(Gitlab::Kubernetes::Helm::DeleteCommand)).and_raise(error) end include_examples 'logs kubernetes errors' do |