diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-05-02 18:27:35 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-05-02 18:27:35 +0000 |
commit | 5432f5480f334a0bd15ed06568e0c82f0dd54e45 (patch) | |
tree | 350ea2de8e0bdaf171f09c5b5886da026f3fc2e1 /spec/support/shared_examples/ci | |
parent | 0c3d7830c5fdaef029457557f7b4ad867805b06a (diff) | |
download | gitlab-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.rb | 27 |
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 |