Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-11-27 16:14:51 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-11-27 16:14:51 +0300
commitfcca3f64527515da2d96e7be3eae133ebbd1bc2d (patch)
treedaf18d71269b13599bcb308d7d599edc0c89cac4 /spec/services
parent913740de00c6a768c145608fd821911ceb370326 (diff)
parent6a66e4a1f116ff98d8f9b8dffa3beed62d74e0b3 (diff)
Merge branch '51792-dont-delete-failed-install-pods' into 'master'
Don't remove failed install pods Closes #51792 See merge request gitlab-org/gitlab-ce!23350
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/clusters/applications/check_installation_progress_service_spec.rb22
1 files changed, 7 insertions, 15 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 ea17f2bb423..9452a9e38fb 100644
--- a/spec/services/clusters/applications/check_installation_progress_service_spec.rb
+++ b/spec/services/clusters/applications/check_installation_progress_service_spec.rb
@@ -8,14 +8,6 @@ describe Clusters::Applications::CheckInstallationProgressService do
let(:phase) { Gitlab::Kubernetes::Pod::UNKNOWN }
let(:errors) { nil }
- shared_examples 'a terminated installation' do
- it 'removes the installation POD' do
- expect(service).to receive(:remove_installation_pod).once
-
- service.execute
- end
- end
-
shared_examples 'a not yet terminated installation' do |a_phase|
let(:phase) { a_phase }
@@ -39,15 +31,13 @@ describe Clusters::Applications::CheckInstallationProgressService do
context 'when timeouted' do
let(:application) { create(:clusters_applications_helm, :timeouted) }
- it_behaves_like 'a terminated installation'
-
it 'make the application errored' do
expect(ClusterWaitForAppInstallationWorker).not_to receive(:perform_in)
service.execute
expect(application).to be_errored
- expect(application.status_reason).to match(/\btimed out\b/)
+ expect(application.status_reason).to eq("Installation timed out. Check pod logs for install-helm for more details.")
end
end
end
@@ -66,7 +56,11 @@ describe Clusters::Applications::CheckInstallationProgressService do
expect(service).to receive(:installation_phase).once.and_return(phase)
end
- it_behaves_like 'a terminated installation'
+ it 'removes the installation POD' do
+ expect(service).to receive(:remove_installation_pod).once
+
+ service.execute
+ end
it 'make the application installed' do
expect(ClusterWaitForAppInstallationWorker).not_to receive(:perform_in)
@@ -86,13 +80,11 @@ describe Clusters::Applications::CheckInstallationProgressService do
expect(service).to receive(:installation_phase).once.and_return(phase)
end
- it_behaves_like 'a terminated installation'
-
it 'make the application errored' do
service.execute
expect(application).to be_errored
- expect(application.status_reason).to eq("Installation failed")
+ expect(application.status_reason).to eq("Installation failed. Check pod logs for install-helm for more details.")
end
end