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:
authorYorick Peterse <yorickpeterse@gmail.com>2017-02-13 19:11:50 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2017-02-13 19:13:02 +0300
commit581cfbae24d629433e2e4eb6f6a2bb2a2938cada (patch)
tree79455eb42c910dd0dc230dda8dc4268d1ebb5bbc /spec/lib/gitlab/database_spec.rb
parent58131ac93c2a7c784c8c4f9025ef250eac4e1fa1 (diff)
Don't connect in Gitlab::Database.adapter_name
We don't need to connect when requesting the name of the database adapter. This in turn should prevent us from requesting/leaking connections just by asking whether we're using PostgreSQL or MySQL.
Diffstat (limited to 'spec/lib/gitlab/database_spec.rb')
-rw-r--r--spec/lib/gitlab/database_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/database_spec.rb b/spec/lib/gitlab/database_spec.rb
index b142b3a2781..41252f31997 100644
--- a/spec/lib/gitlab/database_spec.rb
+++ b/spec/lib/gitlab/database_spec.rb
@@ -5,6 +5,12 @@ class MigrationTest
end
describe Gitlab::Database, lib: true do
+ describe '.adapter_name' do
+ it 'returns the name of the adapter' do
+ expect(described_class.adapter_name).to be_an_instance_of(String)
+ end
+ end
+
# These are just simple smoke tests to check if the methods work (regardless
# of what they may return).
describe '.mysql?' do