Commit de7ad8d3 authored by Ryan Cobb's avatar Ryan Cobb

Clean up specs

parent 35fcedd3
......@@ -10,7 +10,8 @@ module EE
override :groups
def groups
super.merge(
# Start at 100 to avoid collisions with CE values
# Start at -100 to avoid collisions with CE values
# built-in groups
cluster_health: -100
)
end
......@@ -19,6 +20,7 @@ module EE
def group_details
super.merge(
# keys can collide with CE values! please ensure you are not redefining a key that already exists in app/models/prometheus_metric_enums.rb#group_details
# built-in groups
cluster_health: {
group_title: _('Cluster Health'),
required_metrics: %w(container_memory_usage_bytes container_cpu_usage_seconds_total),
......
......@@ -3,17 +3,14 @@
require 'rails_helper'
describe Gitlab::DatabaseImporters::CommonMetrics::PrometheusMetric do
let(:existing_group_titles) do
::PrometheusMetricEnums.group_details.each_with_object({}) do |(key, value), memo|
memo[key] = value[:group_title]
end
end
it 'group enum equals ::PrometheusMetric' do
expect(described_class.groups).to eq(::PrometheusMetric.groups)
end
it '.group_titles equals ::PrometheusMetric' do
existing_group_titles = ::PrometheusMetricEnums.group_details.each_with_object({}) do |(key, value), memo|
memo[key] = value[:group_title]
end
expect(Gitlab::DatabaseImporters::CommonMetrics::PrometheusMetricEnums.group_titles).to eq(existing_group_titles)
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