diff options
author | Fabio Pitino <fpitino@gitlab.com> | 2019-06-21 09:46:58 +0100 |
---|---|---|
committer | Fabio Pitino <fpitino@gitlab.com> | 2019-06-25 10:12:02 +0100 |
commit | a26916d18cab6bc3ed2e6846d130fcd5e36fb313 (patch) | |
tree | b2f3134bb2a0725eec821a3ba0d390229e4acf79 /spec/models/merge_request_spec.rb | |
parent | e6a41c14e023627dba24ec321ddc0794fef41833 (diff) | |
download | gitlab-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.rb | 2 |
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 |