summaryrefslogtreecommitdiff
path: root/spec/services/clusters/applications/check_installation_progress_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/clusters/applications/check_installation_progress_service_spec.rb')
-rw-r--r--spec/services/clusters/applications/check_installation_progress_service_spec.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/spec/services/clusters/applications/check_installation_progress_service_spec.rb b/spec/services/clusters/applications/check_installation_progress_service_spec.rb
index fe04fac9613..faa5b469069 100644
--- a/spec/services/clusters/applications/check_installation_progress_service_spec.rb
+++ b/spec/services/clusters/applications/check_installation_progress_service_spec.rb
@@ -9,8 +9,8 @@ describe Clusters::Applications::CheckInstallationProgressService do
let(:errors) { nil }
shared_examples 'a terminated installation' do
- it 'finalize the installation' do
- expect(service).to receive(:finalize_installation).once
+ it 'removes the installation POD' do
+ expect(service).to receive(:remove_installation_pod).once
service.execute
end
@@ -23,7 +23,7 @@ describe Clusters::Applications::CheckInstallationProgressService do
context 'when not timeouted' do
it 'reschedule a new check' do
expect(ClusterWaitForAppInstallationWorker).to receive(:perform_in).once
- expect(service).not_to receive(:finalize_installation)
+ expect(service).not_to receive(:remove_installation_pod)
service.execute
@@ -53,7 +53,7 @@ describe Clusters::Applications::CheckInstallationProgressService do
expect(service).to receive(:installation_phase).once.and_return(phase)
allow(service).to receive(:installation_errors).and_return(errors)
- allow(service).to receive(:finalize_installation).and_return(nil)
+ allow(service).to receive(:remove_installation_pod).and_return(nil)
end
describe '#execute' do
@@ -61,6 +61,15 @@ describe Clusters::Applications::CheckInstallationProgressService do
let(:phase) { Gitlab::Kubernetes::Pod::SUCCEEDED }
it_behaves_like 'a terminated installation'
+
+ it 'make the application installed' do
+ expect(ClusterWaitForAppInstallationWorker).not_to receive(:perform_in)
+
+ service.execute
+
+ expect(application).to be_installed
+ expect(application.status_reason).to be_nil
+ end
end
context 'when installation POD failed' do