diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-14 20:02:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-14 20:02:53 +0300 |
commit | 4432289851dcfc0bc030323f581866103fd12f66 (patch) | |
tree | 1944634ff12378e0d3824ea539632512e186a190 /spec | |
parent | deac081145948af41fb051acae7217eb5292fe3c (diff) |
Add latest changes from gitlab-org/gitlab@16-2-stable-ee
Diffstat (limited to 'spec')
-rw-r--r-- | spec/tooling/danger/stable_branch_spec.rb | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/spec/tooling/danger/stable_branch_spec.rb b/spec/tooling/danger/stable_branch_spec.rb index 439a878a5e6..69e68f983fd 100644 --- a/spec/tooling/danger/stable_branch_spec.rb +++ b/spec/tooling/danger/stable_branch_spec.rb @@ -59,6 +59,8 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do end context 'when not applicable' do + let(:current_stable_branch) { '15-1-stable-ee' } + where(:stable_branch?, :security_mr?) do true | true false | true @@ -67,7 +69,7 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do with_them do before do - allow(fake_helper).to receive(:mr_target_branch).and_return(stable_branch? ? '15-1-stable-ee' : 'main') + allow(fake_helper).to receive(:mr_target_branch).and_return(stable_branch? ? current_stable_branch : 'main') allow(fake_helper).to receive(:security_mr?).and_return(security_mr?) end @@ -239,7 +241,7 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do end context 'when not an applicable version' do - let(:target_branch) { '14-9-stable-ee' } + let(:target_branch) { '15-0-stable-ee' } it 'warns about the package-and-test pipeline and the version' do expect(stable_branch).to receive(:warn).with(described_class::WARN_PACKAGE_AND_TEST_MESSAGE) @@ -297,18 +299,6 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do it_behaves_like 'without a failure' end - - context 'when too many version API requests are made' do - let(:parsed_response) { [{ 'version' => '15.0.0' }] } - - it 'adds a warning' do - expect(HTTParty).to receive(:get).and_return(version_response).at_least(10).times - expect(stable_branch).to receive(:warn).with(described_class::WARN_PACKAGE_AND_TEST_MESSAGE) - expect(stable_branch).to receive(:warn).with(described_class::FAILED_VERSION_REQUEST_MESSAGE) - - subject - end - end end end |