diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/services/merge_requests/mergeability_check_service_spec.rb | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/services/merge_requests/mergeability_check_service_spec.rb')
-rw-r--r-- | spec/services/merge_requests/mergeability_check_service_spec.rb | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/spec/services/merge_requests/mergeability_check_service_spec.rb b/spec/services/merge_requests/mergeability_check_service_spec.rb index 725fc16fa7c..17bfa9d7368 100644 --- a/spec/services/merge_requests/mergeability_check_service_spec.rb +++ b/spec/services/merge_requests/mergeability_check_service_spec.rb @@ -124,14 +124,6 @@ RSpec.describe MergeRequests::MergeabilityCheckService, :clean_gitlab_redis_shar it_behaves_like 'mergeable merge request' - context 'when lock is disabled' do - before do - stub_feature_flags(merge_ref_auto_sync_lock: false) - end - - it_behaves_like 'mergeable merge request' - end - context 'when concurrent calls' do it 'waits first lock and returns "cached" result in subsequent calls' do threads = execute_within_threads(amount: 3) @@ -167,25 +159,6 @@ RSpec.describe MergeRequests::MergeabilityCheckService, :clean_gitlab_redis_shar end end - context 'disabled merge ref sync feature flag' do - before do - stub_feature_flags(merge_ref_auto_sync: false) - end - - it 'returns error and no payload' do - result = subject - - expect(result).to be_a(ServiceResponse) - expect(result.error?).to be(true) - expect(result.message).to eq('Merge ref is outdated due to disabled feature') - expect(result.payload).to be_empty - end - - it 'ignores merge-ref and updates merge status' do - expect { subject }.to change(merge_request, :merge_status).from('unchecked').to('can_be_merged') - end - end - context 'when broken' do before do expect(merge_request).to receive(:broken?) { true } @@ -305,28 +278,6 @@ RSpec.describe MergeRequests::MergeabilityCheckService, :clean_gitlab_redis_shar context 'recheck enforced' do subject { described_class.new(merge_request).execute(recheck: true) } - context 'when MR is mergeable and merge-ref auto-sync is disabled' do - before do - stub_feature_flags(merge_ref_auto_sync: false) - merge_request.mark_as_mergeable! - end - - it 'returns ServiceResponse.error' do - result = subject - - expect(result).to be_a(ServiceResponse) - expect(result.error?).to be(true) - expect(result.message).to eq('Merge ref is outdated due to disabled feature') - expect(result.payload).to be_empty - end - - it 'merge status is not changed' do - subject - - expect(merge_request.merge_status).to eq('can_be_merged') - end - end - context 'when MR is marked as mergeable, but repo is not mergeable and MR is not opened' do before do # Making sure that we don't touch the merge-status after |