diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-02 18:13:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-02 18:13:35 +0300 |
commit | b2c21b99c7eb52b5fd906b1e7b4b08d4eb7a296c (patch) | |
tree | cef64d6aa4d2d7e008bcdb84c754eab8e9ee117c /spec/scripts/pipeline_test_report_builder_spec.rb | |
parent | ce459835cb32ed396fb7524fb615a5d07f8c51ef (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/scripts/pipeline_test_report_builder_spec.rb')
-rw-r--r-- | spec/scripts/pipeline_test_report_builder_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/scripts/pipeline_test_report_builder_spec.rb b/spec/scripts/pipeline_test_report_builder_spec.rb index e7529eb0d41..bee2a4a5835 100644 --- a/spec/scripts/pipeline_test_report_builder_spec.rb +++ b/spec/scripts/pipeline_test_report_builder_spec.rb @@ -9,6 +9,7 @@ RSpec.describe PipelineTestReportBuilder, feature_category: :tooling do let(:options) do described_class::DEFAULT_OPTIONS.merge( target_project: 'gitlab-org/gitlab', + current_pipeline_id: '42', mr_id: '999', instance_base_url: 'https://gitlab.com', output_file_path: output_file_path @@ -191,10 +192,14 @@ RSpec.describe PipelineTestReportBuilder, feature_category: :tooling do context 'for latest pipeline' do let(:failed_build_uri) { "#{latest_pipeline_url}/tests/suite.json?build_ids[]=#{failed_build_id}" } + let(:current_pipeline_uri) do + "#{options[:api_endpoint]}/projects/#{options[:target_project]}/pipelines/#{options[:current_pipeline_id]}" + end subject { described_class.new(options.merge(pipeline_index: :latest)) } it 'fetches builds from pipeline related to MR' do + expect(subject).to receive(:fetch).with(current_pipeline_uri).and_return(mr_pipelines[0]) expect(subject).to receive(:fetch).with(failed_build_uri).and_return(test_report_for_build) subject.test_report_for_pipeline |