diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/initializers/validate_database_config_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/initializers/validate_database_config_spec.rb')
-rw-r--r-- | spec/initializers/validate_database_config_spec.rb | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/spec/initializers/validate_database_config_spec.rb b/spec/initializers/validate_database_config_spec.rb index 209d9691350..5f3f950a852 100644 --- a/spec/initializers/validate_database_config_spec.rb +++ b/spec/initializers/validate_database_config_spec.rb @@ -39,47 +39,23 @@ RSpec.describe 'validate database config' do end context 'when config/database.yml is valid' do - context 'uses legacy syntax' do - let(:database_yml) do - <<-EOS - production: + let(:database_yml) do + <<-EOS + production: + main: adapter: postgresql encoding: unicode database: gitlabhq_production username: git password: "secure password" host: localhost - EOS - end - - it 'validates configuration with a warning' do - expect(main_object).to receive(:warn).with /uses a deprecated syntax for/ - - expect { subject }.not_to raise_error - end - - it_behaves_like 'with SKIP_DATABASE_CONFIG_VALIDATION=true' + EOS end - context 'uses new syntax' do - let(:database_yml) do - <<-EOS - production: - main: - adapter: postgresql - encoding: unicode - database: gitlabhq_production - username: git - password: "secure password" - host: localhost - EOS - end + it 'validates configuration without errors and warnings' do + expect(main_object).not_to receive(:warn) - it 'validates configuration without errors and warnings' do - expect(main_object).not_to receive(:warn) - - expect { subject }.not_to raise_error - end + expect { subject }.not_to raise_error end end |