summaryrefslogtreecommitdiff
path: root/spec/models/merge_request_spec.rb
diff options
context:
space:
mode:
authorFabio Pitino <fpitino@gitlab.com>2019-06-21 09:46:58 +0100
committerFabio Pitino <fpitino@gitlab.com>2019-06-25 10:12:02 +0100
commita26916d18cab6bc3ed2e6846d130fcd5e36fb313 (patch)
treeb2f3134bb2a0725eec821a3ba0d390229e4acf79 /spec/models/merge_request_spec.rb
parente6a41c14e023627dba24ec321ddc0794fef41833 (diff)
downloadgitlab-ce-a26916d18cab6bc3ed2e6846d130fcd5e36fb313.tar.gz
Require pipeline if "Pipeline must succeed" is setrequire-pipeline-when-enabling-only-allow-merge-if-pipeline-succeeds
When a user sets only_allow_merge_if_pipeline_succeeds, also named as "Pipeline must succeed" project setting, we require the pipeline to be present. This solves race condition issues especially with external CI providers when a build is triggered externally but no pipelines are created in GitLab yet. Document that a head pipeline is expected when using "Pipeline must succeed" setting. Also explain limitations with the use of only/except where there may not be any jobs created and the merge request will not be allowed to be merged.
Diffstat (limited to 'spec/models/merge_request_spec.rb')
-rw-r--r--spec/models/merge_request_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index fc28c216b21..a2547755510 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -2124,7 +2124,7 @@ describe MergeRequest do
allow(subject).to receive(:head_pipeline) { nil }
end
- it { expect(subject.mergeable_ci_state?).to be_truthy }
+ it { expect(subject.mergeable_ci_state?).to be_falsey }
end
end