Commit 5cc30f97 authored by Kirstie Cook's avatar Kirstie Cook

Remove unnecessary env var and cleanup

parent 218799cf
......@@ -223,7 +223,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController
def metrics_dashboard_params
params
.permit(:embedded, :group, :title, :y_label, :dashboard_path, :environment, :sample_metrics)
.merge(dashboard_path: params[:dashboard], environment: environment, sample_metrics: params[:sample_metrics])
.merge(dashboard_path: params[:dashboard], environment: environment)
end
def include_all_dashboards?
......
......@@ -9,17 +9,6 @@ describe Projects::Environments::SampleMetricsController do
let_it_be(:environment) { create(:environment, project: project) }
let_it_be(:user) { create(:user) }
before(:context) do
RSpec::Mocks.with_temporary_scope do
stub_env('USE_SAMPLE_METRICS', 'true')
Rails.application.reload_routes!
end
end
after(:context) do
Rails.application.reload_routes!
end
before do
project.add_reporter(user)
sign_in(user)
......
......@@ -87,7 +87,7 @@ describe Gitlab::Metrics::Dashboard::Processor do
end
end
context 'when sample metrics are present' do
context 'when sample_metrics are requested' do
let(:process_params) { [project, dashboard_yml, sequence, { environment: environment, sample_metrics: true }] }
it 'includes a sample metrics path for the prometheus endpoint with each metric' do
......
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