Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-08 15:08:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-08 15:08:46 +0300
commitcdda3d117c99cadf295f26abc92cb2456033b762 (patch)
tree30315b1ea79ee4639f44a407978ed719c62a1653 /spec/tasks
parentf4ea1f8998fd64bcd02280514b91f103f830d5ce (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tasks')
-rw-r--r--spec/tasks/gitlab/db/validate_config_rake_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/tasks/gitlab/db/validate_config_rake_spec.rb b/spec/tasks/gitlab/db/validate_config_rake_spec.rb
index 0b2c844a91f..b4bad3dd7b9 100644
--- a/spec/tasks/gitlab/db/validate_config_rake_spec.rb
+++ b/spec/tasks/gitlab/db/validate_config_rake_spec.rb
@@ -3,6 +3,10 @@
require 'rake_helper'
RSpec.describe 'gitlab:db:validate_config', :silence_stdout do
+ # We don't need to delete this data since it only modifies `ar_internal_metadata`
+ # which would not be cleaned either by `DbCleaner`
+ self.use_transactional_tests = false
+
before :all do
Rake.application.rake_require 'active_record/railties/databases'
Rake.application.rake_require 'tasks/seed_fu'
@@ -111,6 +115,26 @@ RSpec.describe 'gitlab:db:validate_config', :silence_stdout do
end
it_behaves_like 'validates successfully'
+
+ context 'when config is pointing to incorrect server' do
+ let(:test_config) do
+ {
+ main: main_database_config.merge(port: 11235)
+ }
+ end
+
+ it_behaves_like 'validates successfully'
+ end
+
+ context 'when config is pointing to non-existent database' do
+ let(:test_config) do
+ {
+ main: main_database_config.merge(database: 'non_existent_database')
+ }
+ end
+
+ it_behaves_like 'validates successfully'
+ end
end
context 'when main: uses database_tasks=false' do