summaryrefslogtreecommitdiff
path: root/spec/services/ci/create_pipeline_service_spec.rb
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-08-13 13:29:56 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2019-08-13 15:07:21 +0200
commit93e951821543b0cbb12807cc710d3e21d7db8993 (patch)
tree52f05aac41f37c06dff5d994caceb7ca8085aae6 /spec/services/ci/create_pipeline_service_spec.rb
parent583544d0899c691d5f46712ad576bdacc18259e5 (diff)
downloadgitlab-ce-93e951821543b0cbb12807cc710d3e21d7db8993.tar.gz
Require `needs:` to be presentrequire-needs-to-be-present
This changes the `needs:` logic to require that all jobs to be present. Instead of skipping do fail the pipeline creation if `needs:` dependency is not found.
Diffstat (limited to 'spec/services/ci/create_pipeline_service_spec.rb')
-rw-r--r--spec/services/ci/create_pipeline_service_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb
index 7e2f311a065..deb68899309 100644
--- a/spec/services/ci/create_pipeline_service_spec.rb
+++ b/spec/services/ci/create_pipeline_service_spec.rb
@@ -1113,7 +1113,7 @@ describe Ci::CreatePipelineService do
test_a: {
stage: "test",
script: "ls",
- only: %w[master feature tags],
+ only: %w[master feature],
needs: %w[build_a]
},
deploy: {
@@ -1143,6 +1143,7 @@ describe Ci::CreatePipelineService do
it 'does not create a pipeline as test_a depends on build_a' do
expect(pipeline).not_to be_persisted
expect(pipeline.builds).to be_empty
+ expect(pipeline.errors[:base]).to contain_exactly("test_a: needs 'build_a'")
end
end