Skip to content
Snippets Groups Projects
Commit ed07cfe2 authored by Albert's avatar Albert :red_circle:
Browse files

Remove unused code quality report path

parent dde3a70e
No related branches found
No related tags found
1 merge request!88374Remove unused code quality report path
......@@ -128,20 +128,6 @@ class MergeRequestWidgetEntity < Grape::Entity
end
end
expose :codeclimate, if: -> (mr, _) { head_pipeline_downloadable_path_for_report_type(:codequality) } do
expose :head_path do |merge_request|
head_pipeline_downloadable_path_for_report_type(:codequality)
end
expose :base_path do |merge_request|
if use_merge_base_with_merged_results?
merge_base_pipeline_downloadable_path_for_report_type(:codequality)
else
base_pipeline_downloadable_path_for_report_type(:codequality)
end
end
end
expose :security_reports_docs_path do |merge_request|
help_page_path('user/application_security/index.md', anchor: 'view-security-scan-information-in-merge-requests')
end
......
......@@ -53,7 +53,6 @@ def create_all_artifacts
using RSpec::Parameterized::TableSyntax
where(:json_entry, :artifact_type, :exposures) do
:codeclimate | :codequality | []
:browser_performance | :browser_performance | [:degradation_threshold, :head_path, :base_path]
:browser_performance | :performance | [:degradation_threshold, :head_path, :base_path]
:load_performance | :load_performance | [:head_path, :base_path]
......
......@@ -77,46 +77,6 @@
.to eq("/#{resource.project.full_path}/-/merge_requests/#{resource.iid}.diff")
end
describe 'codequality report artifacts', :request_store do
let(:merge_base_pipeline) { create(:ci_pipeline, :with_codequality_reports, project: project) }
before do
project.add_developer(user)
allow(resource).to receive_messages(
merge_base_pipeline: merge_base_pipeline,
base_pipeline: pipeline,
head_pipeline: pipeline
)
end
context 'with report artifacts' do
let(:pipeline) { create(:ci_pipeline, :with_codequality_reports, project: project) }
let(:generic_job_id) { pipeline.builds.first.id }
let(:merge_base_job_id) { merge_base_pipeline.builds.first.id }
it 'has head_path and base_path entries' do
expect(subject[:codeclimate][:head_path]).to include("/jobs/#{generic_job_id}/artifacts/download?file_type=codequality")
expect(subject[:codeclimate][:base_path]).to include("/jobs/#{generic_job_id}/artifacts/download?file_type=codequality")
end
context 'on pipelines for merged results' do
let(:pipeline) { create(:ci_pipeline, :merged_result_pipeline, :with_codequality_reports, project: project) }
it 'returns URLs from the head_pipeline and merge_base_pipeline' do
expect(subject[:codeclimate][:head_path]).to include("/jobs/#{generic_job_id}/artifacts/download?file_type=codequality")
expect(subject[:codeclimate][:base_path]).to include("/jobs/#{merge_base_job_id}/artifacts/download?file_type=codequality")
end
end
end
context 'without artifacts' do
it 'does not have data entry' do
expect(subject).not_to include(:codeclimate)
end
end
end
describe 'merge_request_add_ci_config_path' do
let!(:project_auto_devops) { create(:project_auto_devops, :disabled, project: project) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment