Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-11-14 13:46:07 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2017-11-14 13:46:07 +0300
commit6b9b516007c8dda88f33e9603a6880e3fc3ff103 (patch)
treec6b9ddc30d54cc043bf474c69f5812268623fe7f /spec
parent8902bdec4d54de0e50657c897a9ade413c443924 (diff)
parentc00fde606ee2d8f87a13c801efc3278396f6bb7f (diff)
Merge branch '39884-fix-pipeline-transition-with-single-manual-action' into 'master'
Make sure all pipelines would go to pending once Closes #39884 See merge request gitlab-org/gitlab-ce!15251
Diffstat (limited to 'spec')
-rw-r--r--spec/services/ci/process_pipeline_service_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/services/ci/process_pipeline_service_spec.rb b/spec/services/ci/process_pipeline_service_spec.rb
index 214adc9960f..0ce41e7c7ee 100644
--- a/spec/services/ci/process_pipeline_service_spec.rb
+++ b/spec/services/ci/process_pipeline_service_spec.rb
@@ -292,6 +292,30 @@ describe Ci::ProcessPipelineService, '#execute' do
end
end
+ context 'when there is only one manual action' do
+ before do
+ create_build('deploy', stage_idx: 0, when: 'manual', allow_failure: true)
+
+ process_pipeline
+ end
+
+ it 'skips the pipeline' do
+ expect(pipeline.reload).to be_skipped
+ end
+
+ context 'when the action was played' do
+ before do
+ play_manual_action('deploy')
+ end
+
+ it 'queues the action and pipeline' do
+ expect(all_builds_statuses).to eq(%w[pending])
+
+ expect(pipeline.reload).to be_pending
+ end
+ end
+ end
+
context 'when blocking manual actions are defined' do
before do
create_build('code:test', stage_idx: 0)