summaryrefslogtreecommitdiff
path: root/spec/tooling/danger/stable_branch_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/tooling/danger/stable_branch_spec.rb')
-rw-r--r--spec/tooling/danger/stable_branch_spec.rb16
1 files changed, 12 insertions, 4 deletions
diff --git a/spec/tooling/danger/stable_branch_spec.rb b/spec/tooling/danger/stable_branch_spec.rb
index f4008e09ef2..6b5c0b8cf27 100644
--- a/spec/tooling/danger/stable_branch_spec.rb
+++ b/spec/tooling/danger/stable_branch_spec.rb
@@ -94,7 +94,7 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do
[
{
'name' => 'e2e:package-and-test',
- 'status' => 'success',
+ 'status' => pipeline_bridge_state,
'downstream_pipeline' => {
'id' => '123',
'status' => package_and_qa_state
@@ -103,6 +103,7 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do
]
end
+ let(:pipeline_bridge_state) { 'running' }
let(:package_and_qa_state) { 'success' }
let(:parsed_response) do
@@ -183,10 +184,10 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do
it_behaves_like 'bypassing when flaky test or docs only'
end
- context 'when package-and-test job is in manual state' do
- let(:package_and_qa_state) { 'manual' }
+ context 'when package-and-test job is being created' do
+ let(:pipeline_bridge_state) { 'created' }
- it_behaves_like 'with a failure', described_class::NEEDS_PACKAGE_AND_TEST_MESSAGE
+ it_behaves_like 'with a warning', described_class::WARN_PACKAGE_AND_TEST_MESSAGE
it_behaves_like 'bypassing when flaky test or docs only'
end
@@ -197,6 +198,13 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do
it_behaves_like 'bypassing when flaky test or docs only'
end
+ context 'when package-and-test job is in manual state' do
+ let(:package_and_qa_state) { 'manual' }
+
+ 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 canceled' do
let(:package_and_qa_state) { 'canceled' }