Skip to content
Snippets Groups Projects
Commit ead431f3e750 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Geo - Remove database_geo.yml cleanup

Deletes cleanup code for transition from database_geo.yml to the
multi-database format.

Related https://gitlab.com/gitlab-org/gitlab/-/issues/351946

Changelog: other

EE: true
parent 308afda689a2
No related branches found
No related tags found
1 merge request!72Intermediate build for testing purposes
......@@ -29,14 +29,6 @@
dependent_services = %w(puma geo-logcursor sidekiq)
# TODO: To be removed in 15.0. See https://gitlab.com/gitlab-org/gitlab/-/issues/351946
templatesymlink 'Remove the deprecated database_geo.yml symlink' do
link_from File.join(gitlab_rails_source_dir, 'config/database_geo.yml')
link_to File.join(gitlab_rails_etc_dir, 'database_geo.yml')
action :delete
end
templatesymlink 'Add the geo database settings to database.yml and create a symlink to Rails root' do
link_from File.join(gitlab_rails_source_dir, 'config/database.yml')
link_to File.join(gitlab_rails_etc_dir, 'database.yml')
......
......@@ -23,14 +23,6 @@
dependent_services = %w(puma sidekiq)
# TODO: To be removed in 15.0. See https://gitlab.com/gitlab-org/gitlab/-/issues/351946
templatesymlink 'Remove the deprecated database_geo.yml symlink' do
link_from File.join(gitlab_rails_source_dir, 'config/database_geo.yml')
link_to File.join(gitlab_rails_etc_dir, 'database_geo.yml')
action :delete
end
templatesymlink 'Removes the geo database settings from database.yml and create a symlink to Rails root' do
link_from File.join(gitlab_rails_source_dir, 'config/database.yml')
link_to File.join(gitlab_rails_etc_dir, 'database.yml')
......
......@@ -15,14 +15,6 @@
stub_gitlab_rb(geo_secondary_role: { enable: false })
end
context 'database_geo.yml' do
it 'removes the database_geo.yml symlink' do
expect(chef_run).to delete_templatesymlink('Remove the deprecated database_geo.yml symlink')
.with(link_to: '/var/opt/gitlab/gitlab-rails/etc/database_geo.yml',
link_from: '/opt/gitlab/embedded/service/gitlab-rails/config/database_geo.yml')
end
end
context 'database.yml' do
shared_examples 'removes Geo database settings' do
it 'renders database.yml without geo database' do
......
......@@ -85,14 +85,6 @@
end
shared_examples 'renders database.yml without geo database' do
context 'database_geo.yml' do
it 'removes the database_geo.yml symlink' do
expect(chef_run).to delete_templatesymlink('Remove the deprecated database_geo.yml symlink')
.with(link_to: '/var/opt/gitlab/gitlab-rails/etc/database_geo.yml',
link_from: '/opt/gitlab/embedded/service/gitlab-rails/config/database_geo.yml')
end
end
context 'database.yml' do
it 'renders database.yml without geo database' do
expect(database_yml[:production].keys).not_to include(:geo)
......@@ -120,14 +112,6 @@
end
shared_examples 'renders database.yml with both main and geo databases' do
context 'database_geo.yml' do
it 'removes the database_geo.yml symlink' do
expect(chef_run).to delete_templatesymlink('Remove the deprecated database_geo.yml symlink')
.with(link_to: '/var/opt/gitlab/gitlab-rails/etc/database_geo.yml',
link_from: '/opt/gitlab/embedded/service/gitlab-rails/config/database_geo.yml')
end
end
context 'database.yml' do
context 'with default settings' do
it 'renders database.yml with main stanza first' do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment