From 48aff82709769b098321c738f3444b9bdaa694c6 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 21 Oct 2020 07:08:36 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-5-stable-ee --- spec/initializers/sidekiq_spec.rb | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 spec/initializers/sidekiq_spec.rb (limited to 'spec/initializers') 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 -- cgit v1.2.1