Commit 53fd52d4 authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Remove reschedule constant and use a variable

parent f9bc8d20
...@@ -363,7 +363,6 @@ RSpec/LeakyConstantDeclaration: ...@@ -363,7 +363,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/models/concerns/triggerable_hooks_spec.rb' - 'spec/models/concerns/triggerable_hooks_spec.rb'
- 'spec/models/repository_spec.rb' - 'spec/models/repository_spec.rb'
- 'spec/services/clusters/applications/check_installation_progress_service_spec.rb' - 'spec/services/clusters/applications/check_installation_progress_service_spec.rb'
- 'spec/services/clusters/applications/check_uninstall_progress_service_spec.rb'
- 'spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb' - 'spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb'
RSpec/EmptyLineAfterHook: RSpec/EmptyLineAfterHook:
......
---
title: Fix leaky constant issue in uninstall progress service check
merge_request: 32036
author: Rajendra Kadam
type: fixed
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
describe Clusters::Applications::CheckUninstallProgressService do describe Clusters::Applications::CheckUninstallProgressService do
RESCHEDULE_PHASES = Gitlab::Kubernetes::Pod::PHASES - [Gitlab::Kubernetes::Pod::SUCCEEDED, Gitlab::Kubernetes::Pod::FAILED].freeze reschedule_phases = Gitlab::Kubernetes::Pod::PHASES - [Gitlab::Kubernetes::Pod::SUCCEEDED, Gitlab::Kubernetes::Pod::FAILED].freeze
let(:application) { create(:clusters_applications_prometheus, :uninstalling) } let(:application) { create(:clusters_applications_prometheus, :uninstalling) }
let(:service) { described_class.new(application) } let(:service) { described_class.new(application) }
...@@ -42,7 +42,7 @@ describe Clusters::Applications::CheckUninstallProgressService do ...@@ -42,7 +42,7 @@ describe Clusters::Applications::CheckUninstallProgressService do
end end
context 'when application is uninstalling' do context 'when application is uninstalling' do
RESCHEDULE_PHASES.each { |phase| it_behaves_like 'a not yet terminated installation', phase } reschedule_phases.each { |phase| it_behaves_like 'a not yet terminated installation', phase }
context 'when installation POD succeeded' do context 'when installation POD succeeded' do
let(:phase) { Gitlab::Kubernetes::Pod::SUCCEEDED } let(:phase) { Gitlab::Kubernetes::Pod::SUCCEEDED }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment