Rubocop cleanup
This commit is contained in:
		
							parent
							
								
									3d302879f4
								
							
						
					
					
						commit
						c9253c3eeb
					
				|  | @ -158,7 +158,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController | |||
|   end | ||||
| 
 | ||||
|   def metrics_dashboard | ||||
|     render_403 and return unless Feature.enabled?(:environment_metrics_use_prometheus_endpoint, project) | ||||
|     render_403 && return unless Feature.enabled?(:environment_metrics_use_prometheus_endpoint, project) | ||||
| 
 | ||||
|     respond_to do |format| | ||||
|       format.json do | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| require 'spec_helper' | ||||
| 
 | ||||
| describe MetricsDashboardProcessingService do | ||||
|   let(:project)   { build(:project) } | ||||
|   let(:project) { build(:project) } | ||||
|   let(:dashboard_yml) { YAML.load_file('spec/fixtures/services/metrics_dashboard_processing_service.yml') } | ||||
| 
 | ||||
|   describe 'process' do | ||||
|  | @ -21,12 +21,11 @@ describe MetricsDashboardProcessingService do | |||
|       let!(:project_metric) { create(:prometheus_metric, project: project) } | ||||
| 
 | ||||
|       it 'includes project-specific metrics' do | ||||
| 
 | ||||
|         project_metric_details = { | ||||
|           query_range: project_metric.query, | ||||
|           unit: project_metric.unit, | ||||
|           label: project_metric.legend, | ||||
|           metric_id: project_metric.id, | ||||
|           metric_id: project_metric.id | ||||
|         } | ||||
| 
 | ||||
|         expect(all_metrics).to include project_metric_details | ||||
|  | @ -41,7 +40,7 @@ describe MetricsDashboardProcessingService do | |||
|     end | ||||
| 
 | ||||
|     it 'orders groups by priority and panels by weight' do | ||||
|       expected_metrics_order = ['metric_b', 'metric_a2', 'metric_a1'] | ||||
|       expected_metrics_order = %w('metric_b metric_a2 metric_a1') | ||||
|       actual_metrics_order = all_metrics.map { |m| m[:id] } | ||||
| 
 | ||||
|       expect(actual_metrics_order).to eq expected_metrics_order | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| require 'spec_helper' | ||||
| 
 | ||||
| describe MetricsDashboardService, :use_clean_rails_memory_store_caching do | ||||
|   let(:project)  { build(:project) } | ||||
|   let(:project) { build(:project) } | ||||
| 
 | ||||
|   describe 'get_dashboard' do | ||||
|     it 'returns a json representation of the environment dashboard' do | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue