diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/lib/gitlab/setup_helper | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/lib/gitlab/setup_helper')
-rw-r--r-- | spec/lib/gitlab/setup_helper/workhorse_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/lib/gitlab/setup_helper/workhorse_spec.rb b/spec/lib/gitlab/setup_helper/workhorse_spec.rb index aa9b4595799..18cb266bf4e 100644 --- a/spec/lib/gitlab/setup_helper/workhorse_spec.rb +++ b/spec/lib/gitlab/setup_helper/workhorse_spec.rb @@ -22,4 +22,28 @@ RSpec.describe Gitlab::SetupHelper::Workhorse do end end end + + describe '.redis_url' do + it 'matches the SharedState URL' do + expect(Gitlab::Redis::SharedState).to receive(:url).and_return('foo') + + expect(described_class.redis_url).to eq('foo') + end + end + + describe '.redis_db' do + subject { described_class.redis_db } + + it 'matches the SharedState DB' do + expect(Gitlab::Redis::SharedState).to receive(:params).and_return(db: 1) + + is_expected.to eq(1) + end + + it 'defaults to 0 if unspecified' do + expect(Gitlab::Redis::SharedState).to receive(:params).and_return({}) + + is_expected.to eq(0) + end + end end |