Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-04 15:10:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-04 15:10:17 +0300
commitc80a1141e306596202f694b101bfb1aab1864de9 (patch)
tree46aaee47523ecd57fa6396dae224c3f1cc4079eb /spec/lib/gitlab/redis
parent57f8f3552ca37f38f19a6520737ae1ce0009efb3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/redis')
-rw-r--r--spec/lib/gitlab/redis/cache_spec.rb9
-rw-r--r--spec/lib/gitlab/redis/queues_spec.rb9
-rw-r--r--spec/lib/gitlab/redis/shared_state_spec.rb9
-rw-r--r--spec/lib/gitlab/redis/wrapper_spec.rb6
4 files changed, 24 insertions, 9 deletions
diff --git a/spec/lib/gitlab/redis/cache_spec.rb b/spec/lib/gitlab/redis/cache_spec.rb
index bc33bbe115a..31141ac1139 100644
--- a/spec/lib/gitlab/redis/cache_spec.rb
+++ b/spec/lib/gitlab/redis/cache_spec.rb
@@ -5,7 +5,14 @@ require 'spec_helper'
RSpec.describe Gitlab::Redis::Cache do
let(:instance_specific_config_file) { "config/redis.cache.yml" }
let(:environment_config_file_name) { "GITLAB_REDIS_CACHE_CONFIG_FILE" }
- let(:class_redis_url) { 'redis://localhost:6380' }
include_examples "redis_shared_examples"
+
+ describe '#raw_config_hash' do
+ it 'has a legacy default URL' do
+ expect(subject).to receive(:fetch_config) { false }
+
+ expect(subject.send(:raw_config_hash)).to eq(url: 'redis://localhost:6380' )
+ end
+ end
end
diff --git a/spec/lib/gitlab/redis/queues_spec.rb b/spec/lib/gitlab/redis/queues_spec.rb
index 85fca9320cf..2e396cde3bf 100644
--- a/spec/lib/gitlab/redis/queues_spec.rb
+++ b/spec/lib/gitlab/redis/queues_spec.rb
@@ -5,7 +5,14 @@ require 'spec_helper'
RSpec.describe Gitlab::Redis::Queues do
let(:instance_specific_config_file) { "config/redis.queues.yml" }
let(:environment_config_file_name) { "GITLAB_REDIS_QUEUES_CONFIG_FILE" }
- let(:class_redis_url) { 'redis://localhost:6381' }
include_examples "redis_shared_examples"
+
+ describe '#raw_config_hash' do
+ it 'has a legacy default URL' do
+ expect(subject).to receive(:fetch_config) { false }
+
+ expect(subject.send(:raw_config_hash)).to eq(url: 'redis://localhost:6381' )
+ end
+ end
end
diff --git a/spec/lib/gitlab/redis/shared_state_spec.rb b/spec/lib/gitlab/redis/shared_state_spec.rb
index 2543c4d9678..d240abfbf5b 100644
--- a/spec/lib/gitlab/redis/shared_state_spec.rb
+++ b/spec/lib/gitlab/redis/shared_state_spec.rb
@@ -5,7 +5,14 @@ require 'spec_helper'
RSpec.describe Gitlab::Redis::SharedState do
let(:instance_specific_config_file) { "config/redis.shared_state.yml" }
let(:environment_config_file_name) { "GITLAB_REDIS_SHARED_STATE_CONFIG_FILE" }
- let(:class_redis_url) { 'redis://localhost:6382' }
include_examples "redis_shared_examples"
+
+ describe '#raw_config_hash' do
+ it 'has a legacy default URL' do
+ expect(subject).to receive(:fetch_config) { false }
+
+ expect(subject.send(:raw_config_hash)).to eq(url: 'redis://localhost:6382' )
+ end
+ end
end
diff --git a/spec/lib/gitlab/redis/wrapper_spec.rb b/spec/lib/gitlab/redis/wrapper_spec.rb
index 39156d06849..dd1f0d8b414 100644
--- a/spec/lib/gitlab/redis/wrapper_spec.rb
+++ b/spec/lib/gitlab/redis/wrapper_spec.rb
@@ -8,10 +8,4 @@ RSpec.describe Gitlab::Redis::Wrapper do
expect { described_class.instrumentation_class }.to raise_error(NameError)
end
end
-
- describe '.default_url' do
- it 'is not implemented' do
- expect { described_class.default_url }.to raise_error(NotImplementedError)
- end
- end
end