summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/ci
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2019-05-02 18:27:35 +0000
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2019-05-02 18:27:35 +0000
commit5432f5480f334a0bd15ed06568e0c82f0dd54e45 (patch)
tree350ea2de8e0bdaf171f09c5b5886da026f3fc2e1 /spec/support/shared_examples/ci
parent0c3d7830c5fdaef029457557f7b4ad867805b06a (diff)
downloadgitlab-ce-5432f5480f334a0bd15ed06568e0c82f0dd54e45.tar.gz
Adds a way to start multiple manual jobs in stage
- Adds an endpoint on PipelinesController - Adds a service that iterates over every build in a stage and plays it. - Includes 'play_manual' details on EntitySerializer - Builds a new Stage state: PlayManual. An stage can take this status if it has manual builds or an skipped, scheduled or manual status - Includes FE modifications and specs
Diffstat (limited to 'spec/support/shared_examples/ci')
-rw-r--r--spec/support/shared_examples/ci/stage_shared_examples.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/support/shared_examples/ci/stage_shared_examples.rb b/spec/support/shared_examples/ci/stage_shared_examples.rb
new file mode 100644
index 00000000000..925974ed11e
--- /dev/null
+++ b/spec/support/shared_examples/ci/stage_shared_examples.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+shared_examples 'manual playable stage' do |stage_type|
+ let(:stage) { build(stage_type, status: status) }
+
+ describe '#manual_playable?' do
+ subject { stage.manual_playable? }
+
+ context 'when is manual' do
+ let(:status) { 'manual' }
+
+ it { is_expected.to be_truthy }
+ end
+
+ context 'when is scheduled' do
+ let(:status) { 'scheduled' }
+
+ it { is_expected.to be_truthy }
+ end
+
+ context 'when is skipped' do
+ let(:status) { 'skipped' }
+
+ it { is_expected.to be_truthy }
+ end
+ end
+end