diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2016-10-13 13:42:33 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2016-10-13 13:42:33 +0300 |
commit | 4eed16cf98a343329ec80e0d168ef8b1b3837f5b (patch) | |
tree | 99fff4867c476c4469f7bbcc60db7ce4027e3ac4 /spec/workers/pipeline_proccess_worker_spec.rb | |
parent | 2208a878bc7704698d9a2dc19c9a161a139b5f35 (diff) | |
parent | 2f2ad9eaf06e4573da77f9602fa9678711dba4d9 (diff) |
Merge branch 'feature/improve-mrwbs-and-todos-for-pipelines' into 'master'
Trigger Merge When Pipeline Succeeds on pipeline event
## What does this MR do?
This MR is meant to improve merge when build succeeds triggers, which has an impact on performance.
- [x] Move Merge When Build Succeeds trigger from commit status to pipeline event
- [x] Drop support for triggering event for branches that include commit status submitted without branch (no longer relevant)
- [x] Perform Merge When Pipeline Succeeds asynchronously to improve performance and avoid race conditions
- [x] Add missing feature test that verifies if MWBS feature actually works and merges merge requests
- [x] Update the documentation to reflect change in the behavior
Moved to separate merge request:
- [ ] Rename Merge When Build Succeeds to Merge When Pipeline Succeeds
- [ ] Update documentation to reflect name change for this feature
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
See merge request !6675
Diffstat (limited to 'spec/workers/pipeline_proccess_worker_spec.rb')
-rw-r--r-- | spec/workers/pipeline_proccess_worker_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/workers/pipeline_proccess_worker_spec.rb b/spec/workers/pipeline_proccess_worker_spec.rb new file mode 100644 index 00000000000..86e9d7f6684 --- /dev/null +++ b/spec/workers/pipeline_proccess_worker_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe PipelineProcessWorker do + describe '#perform' do + context 'when pipeline exists' do + let(:pipeline) { create(:ci_pipeline) } + + it 'processes pipeline' do + expect_any_instance_of(Ci::Pipeline).to receive(:process!) + + described_class.new.perform(pipeline.id) + end + end + + context 'when pipeline does not exist' do + it 'does not raise exception' do + expect { described_class.new.perform(123) } + .not_to raise_error + end + end + end +end |