summaryrefslogtreecommitdiff
path: root/spec/initializers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /spec/initializers
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/initializers')
-rw-r--r--spec/initializers/sidekiq_spec.rb45
1 files changed, 45 insertions, 0 deletions
diff --git a/spec/initializers/sidekiq_spec.rb b/spec/initializers/sidekiq_spec.rb
new file mode 100644
index 00000000000..e34f59c3427
--- /dev/null
+++ b/spec/initializers/sidekiq_spec.rb
@@ -0,0 +1,45 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe 'sidekiq' do
+ describe 'enable_reliable_fetch?' do
+ subject { enable_reliable_fetch? }
+
+ context 'when gitlab_sidekiq_reliable_fetcher is enabled' do
+ before do
+ stub_feature_flags(gitlab_sidekiq_reliable_fetcher: true)
+ end
+
+ it { is_expected.to be_truthy }
+ end
+
+ context 'when gitlab_sidekiq_reliable_fetcher is disabled' do
+ before do
+ stub_feature_flags(gitlab_sidekiq_reliable_fetcher: false)
+ end
+
+ it { is_expected.to be_falsey }
+ end
+ end
+
+ describe 'enable_semi_reliable_fetch_mode?' do
+ subject { enable_semi_reliable_fetch_mode? }
+
+ context 'when gitlab_sidekiq_enable_semi_reliable_fetcher is enabled' do
+ before do
+ stub_feature_flags(gitlab_sidekiq_enable_semi_reliable_fetcher: true)
+ end
+
+ it { is_expected.to be_truthy }
+ end
+
+ context 'when gitlab_sidekiq_enable_semi_reliable_fetcher is disabled' do
+ before do
+ stub_feature_flags(gitlab_sidekiq_enable_semi_reliable_fetcher: false)
+ end
+
+ it { is_expected.to be_falsey }
+ end
+ end
+end