diff --git a/db/fixtures/development/99_common_metrics.rb b/db/fixtures/development/99_common_metrics.rb deleted file mode 100644 index d52f78ea5363f7511a642842cf873e6228694b73..0000000000000000000000000000000000000000 --- a/db/fixtures/development/99_common_metrics.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true - -::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute diff --git a/db/fixtures/production/999_common_metrics.rb b/db/fixtures/production/999_common_metrics.rb deleted file mode 100644 index d52f78ea5363f7511a642842cf873e6228694b73..0000000000000000000000000000000000000000 --- a/db/fixtures/production/999_common_metrics.rb +++ /dev/null @@ -1,3 +0,0 @@ -# frozen_string_literal: true - -::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute diff --git a/ee/spec/features/markdown/metrics_spec.rb b/ee/spec/features/markdown/metrics_spec.rb deleted file mode 100644 index b58502f070d6887e4c094a8c4c4e4411c5de1670..0000000000000000000000000000000000000000 --- a/ee/spec/features/markdown/metrics_spec.rb +++ /dev/null @@ -1,141 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'Metrics rendering', :js, :kubeclient, :use_clean_rails_memory_store_caching, :sidekiq_inline, -feature_category: :team_planning do - include PrometheusHelpers - include KubernetesHelpers - include MetricsDashboardUrlHelpers - - let_it_be(:user) { create(:user) } - let_it_be(:project) { create(:project, :with_prometheus_integration) } - - let(:issue) { create(:issue, project: project, description: description) } - - before do - stub_feature_flags(remove_monitor_metrics: false) - - clear_host_from_memoized_variables - stub_gitlab_domain - - stub_licensed_features(prometheus_alerts: true) - - project.add_maintainer(user) - sign_in(user) - - import_common_metrics - stub_any_prometheus_request_with_response - - allow(Prometheus::ProxyService).to receive(:new).and_call_original - end - - after do - clear_host_from_memoized_variables - end - - # While migrating alerting to CE. - # this context block can be moved after removing the 'unlicensed' context to inside the - # 'internal metrics embeds' block in spec/features/markdown/metrics_spec.rb - # Add `:alert_regex` to clear_host_from_memoized_variables - context 'for GitLab-managed alerting rules' do - let(:metric) { PrometheusMetric.last } - let!(:alert) { create(:prometheus_alert, project: project, prometheus_metric: metric) } - let(:description) { "# Summary \n[](#{metrics_url})" } - let(:metrics_url) do - urls.metrics_dashboard_project_prometheus_alert_url( - project, - metric.id, - environment_id: alert.environment_id, - embedded: true - ) - end - - it 'shows embedded metrics' do - visit project_issue_path(project, issue) - - expect(page).to have_css('div.prometheus-graph') - expect(page).to have_text(metric.title) - expect(page).to have_text(metric.y_label) - expect(page).not_to have_text(metrics_url) - - expect(Prometheus::ProxyService) - .to have_received(:new) - .with(alert.environment, 'GET', 'query_range', hash_including('start', 'end', 'step')) - .at_least(:once) - end - - context 'with remove_monitor_metrics flag enabled' do - before do - stub_feature_flags(remove_monitor_metrics: true) - end - - it 'does not show embedded metrics' do - visit project_issue_path(project, issue) - - expect(page).not_to have_css('div.prometheus-graph') - expect(page).not_to have_text(metric.title) - expect(page).not_to have_text(metric.y_label) - end - end - - # Delete when moving to CE - context 'unlicensed' do - before do - stub_licensed_features(prometheus_alerts: false) - end - - it 'shows no embedded metrics' do - visit project_issue_path(project, issue) - - expect(page).to have_no_css('div.prometheus-graph') - end - end - end - - context 'for GitLab embedded cluster health metrics' do - before do - create(:clusters_integrations_prometheus, cluster: cluster) - stub_kubeclient_discover(cluster.platform.api_url) - stub_prometheus_request(/prometheus-prometheus-server/, body: prometheus_values_body) - stub_prometheus_request(%r{prometheus/api/v1}, body: prometheus_values_body) - end - - let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :project, projects: [project], user: user) } - - let(:params) { [project.namespace.path, project.path, cluster.id] } - let(:query_params) { { group: 'Cluster Health', title: 'CPU Usage', y_label: 'CPU (cores)' } } - let(:metrics_url) { urls.metrics_namespace_project_cluster_url(*params, **query_params) } - let(:description) { "# Summary \n[](#{metrics_url})" } - - it 'shows embedded metrics' do - visit project_issue_path(project, issue) - - expect(page).to have_css('div.metrics-embed') - expect(page).to have_text(query_params[:title]) - expect(page).to have_text(query_params[:y_label]) - expect(page).not_to have_text(metrics_url) - - expect(Prometheus::ProxyService) - .to have_received(:new) - .with(cluster, 'GET', 'query_range', hash_including('start', 'end', 'step')) - .at_least(:once) - end - - context 'when metrics dashboard feature is unavailable' do - before do - stub_feature_flags(remove_monitor_metrics: true) - end - - it 'shows no embedded metrics' do - visit project_issue_path(project, issue) - - expect(page).to have_no_css('div.prometheus-graph') - end - end - end - - def import_common_metrics - ::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute - end -end diff --git a/lib/gitlab/database_importers/common_metrics.rb b/lib/gitlab/database_importers/common_metrics.rb deleted file mode 100644 index f964ae8a27541159030bd6ecd434e00d70e12a17..0000000000000000000000000000000000000000 --- a/lib/gitlab/database_importers/common_metrics.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module DatabaseImporters - module CommonMetrics - end - end -end diff --git a/lib/gitlab/database_importers/common_metrics/importer.rb b/lib/gitlab/database_importers/common_metrics/importer.rb deleted file mode 100644 index 6c61e05674ed23ce453a32a3b9428dc1c39c5c96..0000000000000000000000000000000000000000 --- a/lib/gitlab/database_importers/common_metrics/importer.rb +++ /dev/null @@ -1,78 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module DatabaseImporters - module CommonMetrics - class Importer - MissingQueryId = Class.new(StandardError) - - attr_reader :content - - def initialize(filename = 'common_metrics.yml') - @content = YAML.load_file(Rails.root.join('config', 'prometheus', filename)) - end - - def execute - CommonMetrics::PrometheusMetric.reset_column_information - - process_content do |id, attributes| - find_or_build_metric!(id) - .update!(**attributes) - end - end - - private - - def process_content(&blk) - content['panel_groups'].map do |group| - process_group(group, &blk) - end - end - - def process_group(group, &blk) - attributes = { - group: find_group_title_key(group['group']) - } - - group['panels'].map do |panel| - process_panel(panel, attributes, &blk) - end - end - - def process_panel(panel, attributes, &blk) - attributes = attributes.merge( - title: panel['title'], - y_label: panel['y_label']) - - panel['metrics'].map do |metric_details| - process_metric_details(metric_details, attributes, &blk) - end - end - - def process_metric_details(metric_details, attributes, &blk) - attributes = attributes.merge( - legend: metric_details['label'], - query: metric_details['query_range'], - unit: metric_details['unit']) - - yield(metric_details['id'], attributes) - end - - def find_or_build_metric!(id) - raise MissingQueryId unless id - - CommonMetrics::PrometheusMetric.common.find_by(identifier: id) || - CommonMetrics::PrometheusMetric.new(common: true, identifier: id) - end - - def find_group_title_key(title) - CommonMetrics::PrometheusMetricEnums.groups[find_group_title(title)] - end - - def find_group_title(title) - CommonMetrics::PrometheusMetricEnums.group_titles.invert[title] - end - end - end - end -end diff --git a/lib/gitlab/database_importers/common_metrics/prometheus_metric.rb b/lib/gitlab/database_importers/common_metrics/prometheus_metric.rb deleted file mode 100644 index b4a392cbea934664dcb2021dda9aa95aa24d5ec1..0000000000000000000000000000000000000000 --- a/lib/gitlab/database_importers/common_metrics/prometheus_metric.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module DatabaseImporters - module CommonMetrics - class PrometheusMetric < ApplicationRecord - enum group: PrometheusMetricEnums.groups - scope :common, -> { where(common: true) } - end - end - end -end diff --git a/lib/gitlab/database_importers/common_metrics/prometheus_metric_enums.rb b/lib/gitlab/database_importers/common_metrics/prometheus_metric_enums.rb deleted file mode 100644 index 8a5f53be20fce6cb2e0d08baaae7e70f0be861a8..0000000000000000000000000000000000000000 --- a/lib/gitlab/database_importers/common_metrics/prometheus_metric_enums.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module DatabaseImporters - module CommonMetrics - module PrometheusMetricEnums - def self.groups - { - # built-in groups - nginx_ingress_vts: -1, - ha_proxy: -2, - aws_elb: -3, - nginx: -4, - kubernetes: -5, - nginx_ingress: -6, - - # custom groups - business: 0, - response: 1, - system: 2, - custom: 3, - - cluster_health: -100 - } - end - - def self.group_titles - { - business: _('Business metrics (Custom)'), - response: _('Response metrics (Custom)'), - system: _('System metrics (Custom)'), - nginx_ingress_vts: _('Response metrics (NGINX Ingress VTS)'), - nginx_ingress: _('Response metrics (NGINX Ingress)'), - ha_proxy: _('Response metrics (HA Proxy)'), - aws_elb: _('Response metrics (AWS ELB)'), - nginx: _('Response metrics (NGINX)'), - kubernetes: _('System metrics (Kubernetes)'), - cluster_health: _('Cluster Health'), - custom: _('Custom metrics') - } - end - end - end - end -end diff --git a/spec/db/development/import_common_metrics_spec.rb b/spec/db/development/import_common_metrics_spec.rb deleted file mode 100644 index 396eae9293e7848c630cf38a362f9f3062bbde42..0000000000000000000000000000000000000000 --- a/spec/db/development/import_common_metrics_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'Import metrics on development seed' do - subject { load Rails.root.join('db', 'fixtures', 'development', '99_common_metrics.rb') } - - it "imports all prometheus metrics" do - expect(PrometheusMetric.common).to be_empty - - subject - - expect(PrometheusMetric.common).not_to be_empty - end -end diff --git a/spec/db/production/import_common_metrics_spec.rb b/spec/db/production/import_common_metrics_spec.rb deleted file mode 100644 index 1cc0c2fd77fe9693ad7f3678801e2d72b56f7ecb..0000000000000000000000000000000000000000 --- a/spec/db/production/import_common_metrics_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'Import metrics on production seed' do - subject { load Rails.root.join('db', 'fixtures', 'production', '999_common_metrics.rb') } - - it "imports all prometheus metrics" do - expect(PrometheusMetric.common).to be_empty - - subject - - expect(PrometheusMetric.common).not_to be_empty - end -end diff --git a/spec/db/schema_spec.rb b/spec/db/schema_spec.rb index 686654bda30315d4ac7f4177eda75f5a085a14e2..b5e08c65823fea54ae546942a34e8929e58f1847 100644 --- a/spec/db/schema_spec.rb +++ b/spec/db/schema_spec.rb @@ -206,7 +206,6 @@ 'Clusters::Cluster' => %w[platform_type provider_type], 'CommitStatus' => %w[failure_reason], 'GenericCommitStatus' => %w[failure_reason], - 'Gitlab::DatabaseImporters::CommonMetrics::PrometheusMetric' => %w[group], 'InternalId' => %w[usage], 'List' => %w[list_type], 'NotificationSetting' => %w[level], diff --git a/spec/features/markdown/metrics_spec.rb b/spec/features/markdown/metrics_spec.rb deleted file mode 100644 index 1b68f78e9937a97ad64db4a17036acfda030e253..0000000000000000000000000000000000000000 --- a/spec/features/markdown/metrics_spec.rb +++ /dev/null @@ -1,244 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'Metrics rendering', :js, :kubeclient, :use_clean_rails_memory_store_caching, :sidekiq_inline, feature_category: :metrics do - include PrometheusHelpers - include KubernetesHelpers - include GrafanaApiHelpers - include MetricsDashboardUrlHelpers - - let_it_be(:user) { create(:user) } - let_it_be(:project) { create(:project, :with_prometheus_integration) } - let_it_be(:environment) { create(:environment, project: project) } - - let(:issue) { create(:issue, project: project, description: description) } - let(:description) { "See [metrics dashboard](#{metrics_url}) for info." } - let(:metrics_url) { urls.metrics_project_environment_url(project, environment) } - - before do - stub_feature_flags(remove_monitor_metrics: false) - clear_host_from_memoized_variables - stub_gitlab_domain - - project.add_developer(user) - sign_in(user) - end - - after do - clear_host_from_memoized_variables - end - - shared_examples_for 'metrics dashboard unavailable' do - context 'when metrics dashboard feature is unavailable' do - before do - stub_feature_flags(remove_monitor_metrics: true) - end - - it 'shows no embedded metrics' do - visit project_issue_path(project, issue) - - expect(page).to have_no_css('div.prometheus-graph') - end - end - end - - context 'internal metrics embeds' do - before do - import_common_metrics - stub_any_prometheus_request_with_response - - allow(Prometheus::ProxyService).to receive(:new).and_call_original - end - - include_examples 'metrics dashboard unavailable' - - it 'shows embedded metrics' do - visit project_issue_path(project, issue) - - expect(page).to have_css('div.prometheus-graph') - expect(page).to have_text('Memory Usage (Total)') - expect(page).to have_text('Core Usage (Total)') - - # Ensure that the FE is calling the BE with expected params - expect(Prometheus::ProxyService) - .to have_received(:new) - .with(environment, 'GET', 'query_range', hash_including('start', 'end', 'step')) - .at_least(:once) - end - - context 'with remove_monitor_metrics flag enabled' do - before do - stub_feature_flags(remove_monitor_metrics: true) - end - - it 'does not show embedded metrics' do - visit project_issue_path(project, issue) - - expect(page).not_to have_css('div.prometheus-graph') - expect(page).not_to have_text('Memory Usage (Total)') - expect(page).not_to have_text('Core Usage (Total)') - end - end - - context 'when dashboard params are in included the url' do - let(:metrics_url) { urls.metrics_project_environment_url(project, environment, **chart_params) } - - let(:chart_params) do - { - group: 'System metrics (Kubernetes)', - title: 'Memory Usage (Pod average)', - y_label: 'Memory Used per Pod (MB)' - } - end - - it 'shows embedded metrics for the specific chart' do - visit project_issue_path(project, issue) - - expect(page).to have_css('div.prometheus-graph') - expect(page).to have_text(chart_params[:title]) - expect(page).to have_text(chart_params[:y_label]) - - # Ensure that the FE is calling the BE with expected params - expect(Prometheus::ProxyService) - .to have_received(:new) - .with(environment, 'GET', 'query_range', hash_including('start', 'end', 'step')) - .at_least(:once) - end - - context 'when two dashboard urls are included' do - let(:chart_params_2) do - { - group: 'System metrics (Kubernetes)', - title: 'Core Usage (Total)', - y_label: 'Total Cores' - } - end - - let(:metrics_url_2) { urls.metrics_project_environment_url(project, environment, **chart_params_2) } - let(:description) { "See [metrics dashboard](#{metrics_url}) for info. \n See [metrics dashboard](#{metrics_url_2}) for info." } - let(:issue) { create(:issue, project: project, description: description) } - - it 'shows embedded metrics for both urls' do - visit project_issue_path(project, issue) - - expect(page).to have_css('div.prometheus-graph') - expect(page).to have_text(chart_params[:title]) - expect(page).to have_text(chart_params[:y_label]) - expect(page).to have_text(chart_params_2[:title]) - expect(page).to have_text(chart_params_2[:y_label]) - - # Ensure that the FE is calling the BE with expected params - expect(Prometheus::ProxyService) - .to have_received(:new) - .with(environment, 'GET', 'query_range', hash_including('start', 'end', 'step')) - .at_least(:once) - end - end - end - end - - context 'grafana metrics embeds' do - let(:grafana_integration) { create(:grafana_integration, project: project) } - let(:grafana_base_url) { grafana_integration.grafana_url } - let(:metrics_url) { valid_grafana_dashboard_link(grafana_base_url) } - - before do - stub_dashboard_request(grafana_base_url) - stub_datasource_request(grafana_base_url) - stub_all_grafana_proxy_requests(grafana_base_url) - - allow(Grafana::ProxyService).to receive(:new).and_call_original - end - - include_examples 'metrics dashboard unavailable' - - it 'shows embedded metrics', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/402973' do - visit project_issue_path(project, issue) - - expect(page).to have_css('div.prometheus-graph') - expect(page).to have_text('Expired / Evicted') - expect(page).to have_text('expired - test-attribute-value') - - # Ensure that the FE is calling the BE with expected params - expect(Grafana::ProxyService) - .to have_received(:new) - .with(project, anything, anything, hash_including('query', 'start', 'end', 'step')) - .at_least(:once) - end - end - - context 'transient metrics embeds' do - let(:metrics_url) { urls.metrics_dashboard_project_environment_url(project, environment, embed_json: embed_json) } - let(:title) { 'Important Metrics' } - let(:embed_json) do - { - panel_groups: [{ - panels: [{ - type: 'area-chart', - title: title, - y_label: 'metric', - metrics: [{ - query_range: 'metric * 0.5 < 1' - }] - }] - }] - }.to_json - end - - before do - stub_any_prometheus_request_with_response - end - - include_examples 'metrics dashboard unavailable' - - it 'shows embedded metrics' do - visit project_issue_path(project, issue) - - expect(page).to have_css('div.prometheus-graph') - expect(page).to have_text(title) - end - end - - context 'for GitLab embedded cluster health metrics' do - before do - project.add_maintainer(user) - import_common_metrics - stub_any_prometheus_request_with_response - - allow(Prometheus::ProxyService).to receive(:new).and_call_original - - create(:clusters_integrations_prometheus, cluster: cluster) - stub_kubeclient_discover(cluster.platform.api_url) - stub_prometheus_request(/prometheus-prometheus-server/, body: prometheus_values_body) - stub_prometheus_request(%r{prometheus/api/v1}, body: prometheus_values_body) - end - - let_it_be(:cluster) { create(:cluster, :provided_by_gcp, :project, projects: [project], user: user) } - - let(:params) { [project.namespace.path, project.path, cluster.id] } - let(:query_params) { { group: 'Cluster Health', title: 'CPU Usage', y_label: 'CPU (cores)' } } - let(:metrics_url) { urls.namespace_project_cluster_url(*params, **query_params) } - let(:description) { "# Summary \n[](#{metrics_url})" } - - include_examples 'metrics dashboard unavailable' - - it 'shows embedded metrics' do - visit project_issue_path(project, issue) - - expect(page).to have_css('div.prometheus-graph') - expect(page).to have_text(query_params[:title]) - expect(page).to have_text(query_params[:y_label]) - expect(page).not_to have_text(metrics_url) - - expect(Prometheus::ProxyService) - .to have_received(:new) - .with(cluster, 'GET', 'query_range', hash_including('start', 'end', 'step')) - .at_least(:once) - end - end - - def import_common_metrics - ::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute - end -end diff --git a/spec/lib/gitlab/database_importers/common_metrics/importer_spec.rb b/spec/lib/gitlab/database_importers/common_metrics/importer_spec.rb deleted file mode 100644 index 1150de880b558f48cf108d108604fea6cc34d6b6..0000000000000000000000000000000000000000 --- a/spec/lib/gitlab/database_importers/common_metrics/importer_spec.rb +++ /dev/null @@ -1,122 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::DatabaseImporters::CommonMetrics::Importer do - subject { described_class.new } - - context "does import common_metrics.yml" do - let(:groups) { subject.content['panel_groups'] } - let(:panels) { groups.flat_map { |group| group['panels'] } } - let(:metrics) { panels.flat_map { |group| group['metrics'] } } - let(:metric_ids) { metrics.map { |metric| metric['id'] } } - - before do - subject.execute - end - - it "has the same amount of groups" do - expect(PrometheusMetric.common.group(:group).count.count).to eq(groups.count) - end - - it "has the same amount of panels" do - expect(PrometheusMetric.common.group(:group, :title).count.count).to eq(panels.count) - end - - it "has the same amount of metrics" do - expect(PrometheusMetric.common.count).to eq(metrics.count) - end - - it "does not have duplicate IDs" do - expect(metric_ids).to eq(metric_ids.uniq) - end - - it "imports all IDs" do - expect(PrometheusMetric.common.pluck(:identifier)).to contain_exactly(*metric_ids) - end - end - - context "does import common_metrics.yml" do - it "when executed from outside of the Rails.root" do - Dir.chdir(Dir.tmpdir) do - expect { subject.execute }.not_to raise_error - end - - expect(PrometheusMetric.common).not_to be_empty - end - end - - context 'does import properly all fields' do - let(:query_identifier) { 'response-metric' } - let(:dashboard) do - { - panel_groups: [{ - group: 'Response metrics (NGINX Ingress)', - panels: [{ - title: "Throughput", - y_label: "Requests / Sec", - metrics: [{ - id: query_identifier, - query_range: 'my-query', - unit: 'my-unit', - label: 'status code' - }] - }] - }] - } - end - - before do - expect(subject).to receive(:content) { dashboard.deep_stringify_keys } - end - - shared_examples 'stores metric' do - let(:metric) { PrometheusMetric.find_by(identifier: query_identifier) } - - it 'with all data' do - expect(metric.group).to eq('nginx_ingress') - expect(metric.title).to eq('Throughput') - expect(metric.y_label).to eq('Requests / Sec') - expect(metric.unit).to eq('my-unit') - expect(metric.legend).to eq('status code') - expect(metric.query).to eq('my-query') - end - end - - context 'if ID is missing' do - let(:query_identifier) {} - - it 'raises exception' do - expect { subject.execute }.to raise_error(Gitlab::DatabaseImporters::CommonMetrics::Importer::MissingQueryId) - end - end - - context 'for existing common metric with different ID' do - let!(:existing_metric) { create(:prometheus_metric, :common, identifier: 'my-existing-metric') } - - before do - subject.execute - end - - it_behaves_like 'stores metric' do - it 'and existing metric is not changed' do - expect(metric).not_to eq(existing_metric) - end - end - end - - context 'when metric with ID exists ' do - let!(:existing_metric) { create(:prometheus_metric, :common, identifier: 'response-metric') } - - before do - subject.execute - end - - it_behaves_like 'stores metric' do - it 'and existing metric is changed' do - expect(metric).to eq(existing_metric) - end - end - end - end -end diff --git a/spec/lib/gitlab/database_importers/common_metrics/prometheus_metric_spec.rb b/spec/lib/gitlab/database_importers/common_metrics/prometheus_metric_spec.rb deleted file mode 100644 index 98a8e144d16d9b54d1905a449e2595618d798bbc..0000000000000000000000000000000000000000 --- a/spec/lib/gitlab/database_importers/common_metrics/prometheus_metric_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::DatabaseImporters::CommonMetrics::PrometheusMetric do - it 'group enum equals ::PrometheusMetric' do - expect(described_class.groups).to eq(::PrometheusMetric.groups) - end - - it '.group_titles equals ::PrometheusMetric' do - existing_group_titles = Enums::PrometheusMetric.group_details.transform_values do |value| - value[:group_title] - end - expect(Gitlab::DatabaseImporters::CommonMetrics::PrometheusMetricEnums.group_titles).to eq(existing_group_titles) - end -end