diff options
Diffstat (limited to 'spec/tooling')
-rw-r--r-- | spec/tooling/danger/stable_branch_spec.rb | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/spec/tooling/danger/stable_branch_spec.rb b/spec/tooling/danger/stable_branch_spec.rb index 6b5c0b8cf27..4d86e066c20 100644 --- a/spec/tooling/danger/stable_branch_spec.rb +++ b/spec/tooling/danger/stable_branch_spec.rb @@ -177,20 +177,37 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do it_behaves_like 'bypassing when flaky test or docs only' end - context 'when no package-and-test job is found' do + context 'when no package-and-test bridge is found' do let(:pipeline_bridges_response) { nil } it_behaves_like 'with a failure', described_class::NEEDS_PACKAGE_AND_TEST_MESSAGE it_behaves_like 'bypassing when flaky test or docs only' end - context 'when package-and-test job is being created' do + context 'when package-and-test bridge is created' do let(:pipeline_bridge_state) { 'created' } it_behaves_like 'with a warning', described_class::WARN_PACKAGE_AND_TEST_MESSAGE it_behaves_like 'bypassing when flaky test or docs only' end + context 'when package-and-test bridge has been canceled and no downstream pipeline is generated' do + let(:pipeline_bridge_state) { 'canceled' } + + let(:pipeline_bridges_response) do + [ + { + 'name' => 'e2e:package-and-test', + 'status' => pipeline_bridge_state, + 'downstream_pipeline' => nil + } + ] + end + + it_behaves_like 'with a failure', described_class::NEEDS_PACKAGE_AND_TEST_MESSAGE + it_behaves_like 'bypassing when flaky test or docs only' + end + context 'when package-and-test job is in a non-successful state' do let(:package_and_qa_state) { 'running' } |