diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-02-13 17:11:50 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2017-02-13 17:13:02 +0100 |
commit | 581cfbae24d629433e2e4eb6f6a2bb2a2938cada (patch) | |
tree | 79455eb42c910dd0dc230dda8dc4268d1ebb5bbc /spec/lib/gitlab/database_spec.rb | |
parent | 58131ac93c2a7c784c8c4f9025ef250eac4e1fa1 (diff) | |
download | gitlab-ce-581cfbae24d629433e2e4eb6f6a2bb2a2938cada.tar.gz |
Don't connect in Gitlab::Database.adapter_namefix-ar-connection-leaks
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.rb | 6 |
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 |