diff options
author | Stan Hu <stanhu@gmail.com> | 2016-05-09 00:21:10 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-05-12 07:00:19 -0500 |
commit | 7f7359b1381d376b81fd9b81120d8cfa0231a526 (patch) | |
tree | bec8110ed8c14fb0dc38ced1ebf21177dbc2acc5 /spec/gitlab_config_spec.rb | |
parent | f0f1bbec8ad5d5fade7c0efeee22ba9b9bc44f07 (diff) | |
download | gitlab-shell-7f7359b1381d376b81fd9b81120d8cfa0231a526.tar.gz |
Use Redis Ruby client instead of shelling out to redis-cli
Closes gitlab-org/gitlab-ce#17329
Diffstat (limited to 'spec/gitlab_config_spec.rb')
-rw-r--r-- | spec/gitlab_config_spec.rb | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/spec/gitlab_config_spec.rb b/spec/gitlab_config_spec.rb index 0ce641b..6c1af85 100644 --- a/spec/gitlab_config_spec.rb +++ b/spec/gitlab_config_spec.rb @@ -38,7 +38,7 @@ eos context 'remove trailing slashes' do before { config.send(:config)['gitlab_url'] = url + '//' } - + it { should eq(url) } end end @@ -48,40 +48,4 @@ eos it("returns false by default") { should eq(false) } end - - describe :redis_command do - subject { config.redis_command } - - context "with empty redis config" do - before do - config.stub(:redis) { {} } - end - - it { should be_an(Array) } - it { should include('redis-cli') } - end - - context "with host and port" do - before do - config.stub(:redis) { {'host' => 'localhost', 'port' => 1123, 'bin' => '/usr/bin/redis-cli'} } - end - - it { should be_an(Array) } - it { should include(config.redis['host']) } - it { should include(config.redis['bin']) } - it { should include(config.redis['port'].to_s) } - end - - context "with redis socket" do - let(:socket) { '/tmp/redis.socket' } - before do - config.stub(:redis) { {'bin' => '', 'socket' => socket } } - end - - it { should be_an(Array) } - it { should include(socket) } - it { should_not include('-p') } - it { should_not include('-h') } - end - end end |