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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-03 03:12:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-03 03:12:53 +0300
commita77c9fccd057514a8b78a10642779f54a22f3f76 (patch)
tree5746326ff4e1e25f01af2062454f90bdc3f57d35 /spec/tooling
parenta88ffaad9f9f321a71657ac0aca4d947f5bc6a5b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tooling')
-rw-r--r--spec/tooling/danger/stable_branch_spec.rb39
1 files changed, 21 insertions, 18 deletions
diff --git a/spec/tooling/danger/stable_branch_spec.rb b/spec/tooling/danger/stable_branch_spec.rb
index a0c628b0add..1bfa62b2379 100644
--- a/spec/tooling/danger/stable_branch_spec.rb
+++ b/spec/tooling/danger/stable_branch_spec.rb
@@ -92,11 +92,19 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do
let(:pipeline_bridges_response) do
[
- { 'name' => 'e2e:package-and-test',
- 'status' => 'success' }
+ {
+ 'name' => 'e2e:package-and-test',
+ 'status' => 'success',
+ 'downstream_pipeline' => {
+ 'id' => '123',
+ 'status' => package_and_qa_state
+ }
+ }
]
end
+ let(:package_and_qa_state) { 'success' }
+
let(:parsed_response) do
[
{ 'version' => '15.1.1' },
@@ -176,31 +184,26 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do
end
context 'when package-and-test job is in manual state' do
- described_class::FAILING_PACKAGE_AND_TEST_STATUSES.each do |status|
- let(:pipeline_bridges_response) do
- [
- { 'name' => 'e2e:package-and-test',
- 'status' => status }
- ]
- end
+ 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
+ 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(:pipeline_bridges_response) do
- [
- { 'name' => 'e2e:package-and-test',
- 'status' => 'running' }
- ]
- end
+ let(:package_and_qa_state) { 'running' }
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 job is canceled' do
+ let(:package_and_qa_state) { 'canceled' }
+
+ 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 no pipeline is found' do
before do
allow(gitlab_gem_client).to receive(:mr_json).and_return({})