diff options
author | Rémy Coutable <remy@rymai.me> | 2017-02-22 16:29:38 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-02-22 16:29:38 +0000 |
commit | 15b7bc624b89ebb6b98b0f03801d68ea6a480b82 (patch) | |
tree | 1ba7a67ff5857783c3761cc601c5418309821f0a /spec | |
parent | 475715f18f03ff059618b42b3ecdf162cb419403 (diff) | |
parent | cf521c95761540f273804d23a1150dbb0af4e63b (diff) | |
download | gitlab-ce-15b7bc624b89ebb6b98b0f03801d68ea6a480b82.tar.gz |
Merge branch 'connection-pool-host' into 'master'
Allow setting of a custom connection pool host
See merge request !9445
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/database_spec.rb | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/spec/lib/gitlab/database_spec.rb b/spec/lib/gitlab/database_spec.rb index f01c42aff91..edd01d032c8 100644 --- a/spec/lib/gitlab/database_spec.rb +++ b/spec/lib/gitlab/database_spec.rb @@ -119,9 +119,24 @@ describe Gitlab::Database, lib: true do it 'creates a new connection pool with specific pool size' do pool = described_class.create_connection_pool(5) - expect(pool) - .to be_kind_of(ActiveRecord::ConnectionAdapters::ConnectionPool) - expect(pool.spec.config[:pool]).to eq(5) + begin + expect(pool) + .to be_kind_of(ActiveRecord::ConnectionAdapters::ConnectionPool) + + expect(pool.spec.config[:pool]).to eq(5) + ensure + pool.disconnect! + end + end + + it 'allows setting of a custom hostname' do + pool = described_class.create_connection_pool(5, '127.0.0.1') + + begin + expect(pool.spec.config[:host]).to eq('127.0.0.1') + ensure + pool.disconnect! + end end end |