Commit 38352a4a authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'leaky-constant-fix-19' into 'master'

Fix leaky constant in cluster spec

See merge request gitlab-org/gitlab!32053
parents 8b47237c 85a8f5c4
......@@ -378,7 +378,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/mailers/notify_spec.rb'
- 'spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb'
- 'spec/migrations/encrypt_plaintext_attributes_on_application_settings_spec.rb'
- 'spec/models/clusters/cluster_spec.rb'
- 'spec/models/concerns/batch_destroy_dependent_associations_spec.rb'
- 'spec/models/concerns/bulk_insert_safe_spec.rb'
- 'spec/models/concerns/bulk_insertable_associations_spec.rb'
......
---
title: Fix leaky constant issue in cluster spec
merge_request: 32053
author: Rajendra Kadam
type: fixed
......@@ -943,9 +943,9 @@ describe Clusters::Cluster, :use_clean_rails_memory_store_caching do
end
describe '#make_cleanup_errored!' do
NON_ERRORED_STATES = Clusters::Cluster.state_machines[:cleanup_status].states.keys - [:cleanup_errored]
non_errored_states = Clusters::Cluster.state_machines[:cleanup_status].states.keys - [:cleanup_errored]
NON_ERRORED_STATES.each do |state|
non_errored_states.each do |state|
it "transitions cleanup_status from #{state} to cleanup_errored" do
cluster = create(:cluster, state)
......
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