diff options
author | Valery Sizov <valery@gitlab.com> | 2019-01-25 14:10:04 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2019-01-25 14:16:42 +0200 |
commit | e3cacb95a85080c9bd8993b26e996d952fbab05f (patch) | |
tree | 0e802b12beb16e911c84767034802c5ef3bab4b7 /spec/lib/gitlab/gitaly_client_spec.rb | |
parent | 3a60173738c277b7ad7da31ebb577d1aaf694485 (diff) | |
download | gitlab-ce-e3cacb95a85080c9bd8993b26e996d952fbab05f.tar.gz |
Add connection_data method to Gitaly client
Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7434
Diffstat (limited to 'spec/lib/gitlab/gitaly_client_spec.rb')
-rw-r--r-- | spec/lib/gitlab/gitaly_client_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client_spec.rb b/spec/lib/gitlab/gitaly_client_spec.rb index e41a75c37a7..cf12baf1a93 100644 --- a/spec/lib/gitlab/gitaly_client_spec.rb +++ b/spec/lib/gitlab/gitaly_client_spec.rb @@ -119,6 +119,15 @@ describe Gitlab::GitalyClient do end end + describe '.connection_data' do + it 'returns connection data' do + address = 'tcp://localhost:9876' + stub_repos_storages address + + expect(described_class.connection_data('default')).to eq({ 'address' => address, 'token' => 'secret' }) + end + end + describe 'allow_n_plus_1_calls' do context 'when RequestStore is enabled', :request_store do it 'returns the result of the allow_n_plus_1_calls block' do |