Commit d3483565 authored by Michael Kozono's avatar Michael Kozono

Merge branch 'alexives/233446/remove_tf_feature_flag_disables' into 'master'

Remove stub_feature_flags for Terraform replication

Closes #233446

See merge request gitlab-org/gitlab!40920
parents 957bd3bc 2f6f0d4d
...@@ -13,24 +13,24 @@ RSpec.describe Gitlab::Geo::GeoNodeStatusCheck do ...@@ -13,24 +13,24 @@ RSpec.describe Gitlab::Geo::GeoNodeStatusCheck do
describe '#replication_verification_complete?' do describe '#replication_verification_complete?' do
before do before do
allow(Gitlab.config.geo.registry_replication).to receive(:enabled).and_return(true) allow(Gitlab.config.geo.registry_replication).to receive(:enabled).and_return(true)
stub_feature_flags(geo_terraform_state_replication: false)
end end
it 'prints messages for all verification checks' do it 'prints messages for all verification checks' do
[ checks = [
/Repositories/, /Repositories: /,
/Verified Repositories/, /Verified Repositories: /,
/Wikis/, /Wikis: /,
/Verified Wikis/, /Verified Wikis: /,
/LFS Objects/, /LFS Objects: /,
/Attachments/, /Attachments: /,
/CI job artifacts/, /CI job artifacts: /,
/Container repositories/, /Container repositories: /,
/Design repositories/, /Design repositories: /,
/Repositories Checked/, /Repositories Checked: /
/Package Files Checked/ ] + Gitlab::Geo.enabled_replicator_classes.map { |k| /#{k.replicable_title_plural} Checked:/ } +
].each do |text| Gitlab::Geo.enabled_replicator_classes.map { |k| /#{k.replicable_title_plural}:/ }
checks.each do |text|
expect { subject.print_replication_verification_status }.to output(text).to_stdout expect { subject.print_replication_verification_status }.to output(text).to_stdout
end end
end end
......
...@@ -8,7 +8,6 @@ RSpec.describe 'geo rake tasks', :geo do ...@@ -8,7 +8,6 @@ RSpec.describe 'geo rake tasks', :geo do
before do before do
Rake.application.rake_require 'tasks/geo' Rake.application.rake_require 'tasks/geo'
stub_licensed_features(geo: true) stub_licensed_features(geo: true)
stub_feature_flags(geo_terraform_state_replication: false)
end end
it 'Gitlab:Geo::DatabaseTasks responds to all methods used in Geo rake tasks' do it 'Gitlab:Geo::DatabaseTasks responds to all methods used in Geo rake tasks' do
...@@ -345,27 +344,30 @@ RSpec.describe 'geo rake tasks', :geo do ...@@ -345,27 +344,30 @@ RSpec.describe 'geo rake tasks', :geo do
end end
it 'prints messages for all the checks' do it 'prints messages for all the checks' do
[ checks = [
/Name/, /Name: /,
/URL/, /URL: /,
/GitLab Version/, /GitLab Version: /,
/Geo Role/, /Geo Role: /,
/Health Status/, /Health Status: /,
/Sync Settings/, /Sync Settings: /,
/Database replication lag/, /Database replication lag: /,
/Repositories/, /Repositories: /,
/Verified Repositories/, /Verified Repositories: /,
/Wikis/, /Wikis: /,
/Verified Wikis/, /Verified Wikis: /,
/LFS Objects/, /LFS Objects: /,
/Attachments/, /Attachments: /,
/CI job artifacts/, /CI job artifacts: /,
/Container repositories/, /Container repositories: /,
/Design repositories/, /Design repositories: /,
/Repositories Checked/, /Repositories Checked: /,
/Last event ID seen from primary/, /Last event ID seen from primary: /,
/Last status report was/ /Last status report was: /
].each do |text| ] + Gitlab::Geo.enabled_replicator_classes.map { |k| /#{k.replicable_title_plural} Checked:/ } +
Gitlab::Geo.enabled_replicator_classes.map { |k| /#{k.replicable_title_plural}:/ }
checks.each do |text|
expect { run_rake_task('geo:status') }.to output(text).to_stdout expect { run_rake_task('geo:status') }.to output(text).to_stdout
end end
end end
......
...@@ -8,7 +8,6 @@ RSpec.describe 'gitlab:geo rake tasks', :geo do ...@@ -8,7 +8,6 @@ RSpec.describe 'gitlab:geo rake tasks', :geo do
before do before do
Rake.application.rake_require 'tasks/gitlab/geo' Rake.application.rake_require 'tasks/gitlab/geo'
stub_licensed_features(geo: true) stub_licensed_features(geo: true)
stub_feature_flags(geo_terraform_state_replication: false)
end end
describe 'gitlab:geo:check_replication_verification_status' do describe 'gitlab:geo:check_replication_verification_status' do
......
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