Commit 6635c5f0 authored by Matija Čupić's avatar Matija Čupić Committed by Kamil Trzciński

Remove Metrics feature flag gate

parent d6d93fe2
...@@ -43,10 +43,6 @@ module EE ...@@ -43,10 +43,6 @@ module EE
end end
def metrics_reports def metrics_reports
unless ::Feature.enabled?(:metrics_reports, project)
return render json: '', status: :bad_request
end
reports_response(merge_request.compare_metrics_reports) reports_response(merge_request.compare_metrics_reports)
end end
......
...@@ -403,6 +403,8 @@ describe Projects::MergeRequestsController do ...@@ -403,6 +403,8 @@ describe Projects::MergeRequestsController do
end end
describe 'GET #metrics_reports' do describe 'GET #metrics_reports' do
let(:merge_request) { create(:ee_merge_request, :with_metrics_reports, source_project: project, author: create(:user)) }
let(:params) do let(:params) do
{ {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
...@@ -413,9 +415,6 @@ describe Projects::MergeRequestsController do ...@@ -413,9 +415,6 @@ describe Projects::MergeRequestsController do
subject { get :metrics_reports, params: params, format: :json } subject { get :metrics_reports, params: params, format: :json }
context 'when feature is enabled' do
let(:merge_request) { create(:ee_merge_request, :with_metrics_reports, source_project: project, author: create(:user)) }
before do before do
allow_any_instance_of(::MergeRequest).to receive(:compare_reports) allow_any_instance_of(::MergeRequest).to receive(:compare_reports)
.with(::Ci::CompareMetricsReportsService).and_return(comparison_status) .with(::Ci::CompareMetricsReportsService).and_return(comparison_status)
...@@ -488,17 +487,4 @@ describe Projects::MergeRequestsController do ...@@ -488,17 +487,4 @@ describe Projects::MergeRequestsController do
end end
end end
end end
context 'when feature is not enabled' do
before do
stub_feature_flags(metrics_reports: false)
end
it 'returns no content' do
subject
expect(response).to have_gitlab_http_status(:bad_request)
end
end
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment