summaryrefslogtreecommitdiff
path: root/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb
diff options
context:
space:
mode:
authorJoão Cunha <j.a.cunha@gmail.com>2019-08-29 17:21:35 +0000
committerJan Provaznik <jprovaznik@gitlab.com>2019-08-29 17:21:35 +0000
commit1cec47ec1a9ebba716a5396b560bf7efc3319020 (patch)
tree6cb3cce65f72cb7b90019713627fbb8dd375ceae /spec/services/clusters/applications/check_uninstall_progress_service_spec.rb
parent2d31e3cbd1b5ad5564b25f049fc8443eef3f5a69 (diff)
downloadgitlab-ce-1cec47ec1a9ebba716a5396b560bf7efc3319020.tar.gz
DRY check progress services
Extract duplicated code from two similar classes into a parent one.
Diffstat (limited to 'spec/services/clusters/applications/check_uninstall_progress_service_spec.rb')
-rw-r--r--spec/services/clusters/applications/check_uninstall_progress_service_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb b/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb
index a948b442441..1a9f7089c3d 100644
--- a/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb
+++ b/spec/services/clusters/applications/check_uninstall_progress_service_spec.rb
@@ -20,7 +20,7 @@ describe Clusters::Applications::CheckUninstallProgressService do
let(:phase) { a_phase }
before do
- expect(service).to receive(:installation_phase).once.and_return(phase)
+ expect(service).to receive(:pod_phase).once.and_return(phase)
end
context "when phase is #{a_phase}" do
@@ -47,7 +47,7 @@ describe Clusters::Applications::CheckUninstallProgressService do
context 'when installation POD succeeded' do
let(:phase) { Gitlab::Kubernetes::Pod::SUCCEEDED }
before do
- expect(service).to receive(:installation_phase).once.and_return(phase)
+ expect(service).to receive(:pod_phase).once.and_return(phase)
end
it 'removes the installation POD' do
@@ -95,7 +95,7 @@ describe Clusters::Applications::CheckUninstallProgressService do
let(:errors) { 'test installation failed' }
before do
- expect(service).to receive(:installation_phase).once.and_return(phase)
+ expect(service).to receive(:pod_phase).once.and_return(phase)
end
it 'make the application errored' do
@@ -110,7 +110,7 @@ describe Clusters::Applications::CheckUninstallProgressService do
let(:application) { create(:clusters_applications_prometheus, :timed_out, :uninstalling) }
before do
- expect(service).to receive(:installation_phase).once.and_return(phase)
+ expect(service).to receive(:pod_phase).once.and_return(phase)
end
it 'make the application errored' do
@@ -131,7 +131,7 @@ describe Clusters::Applications::CheckUninstallProgressService do
before do
application.update!(cluster: cluster)
- expect(service).to receive(:installation_phase).and_raise(error)
+ expect(service).to receive(:pod_phase).and_raise(error)
end
include_examples 'logs kubernetes errors' do