Commit df8a56e6 authored by Ryan Cobb's avatar Ryan Cobb

Rename Gitlab::Importers module

In order to avoid confusion between Gitlab::Importers module and other
like named modules, this renamed it to Gitlab::DatabaseImporters.
parent 68b37a99
# frozen_string_literal: true
::Gitlab::Importers::CommonMetrics::Importer.new.execute
::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute
# frozen_string_literal: true
::Gitlab::Importers::CommonMetrics::Importer.new.execute
::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute
......@@ -6,7 +6,7 @@ class ImportCommonMetrics < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
::Gitlab::Importers::CommonMetrics::Importer.new.execute
::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute
end
def down
......
......@@ -4,7 +4,7 @@ class ImportCommonMetricsNginxVts < ActiveRecord::Migration[5.0]
DOWNTIME = false
def up
::Gitlab::Importers::CommonMetrics::Importer.new.execute
::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute
end
def down
......
......@@ -6,7 +6,7 @@ class ImportCommonMetricsKnative < ActiveRecord::Migration[5.0]
DOWNTIME = false
def up
::Gitlab::Importers::CommonMetrics::Importer.new.execute
::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute
end
def down
......
......@@ -9,7 +9,7 @@ class PrometheusKnative05Fix < ActiveRecord::Migration[5.0]
DOWNTIME = false
def up
::Gitlab::Importers::CommonMetrics::Importer.new.execute
::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute
end
def down
......
......@@ -36,7 +36,7 @@ class ImportCommonMetrics < ActiveRecord::Migration[4.2]
DOWNTIME = false
def up
::Gitlab::Importers::CommonMetrics::Importer.new.execute
::Gitlab::DatabaseImporters::CommonMetrics::Importer.new.execute
end
def down
......
# frozen_string_literal: true
module Gitlab
module Importers
module DatabaseImporters
module CommonMetrics
end
end
......
# frozen_string_literal: true
module Gitlab
module Importers
module DatabaseImporters
module CommonMetrics
class Importer
MissingQueryId = Class.new(StandardError)
......
# frozen_string_literal: true
module Gitlab
module Importers
module DatabaseImporters
module CommonMetrics
class PrometheusMetric < ApplicationRecord
enum group: PrometheusMetricEnums.groups
......
# frozen_string_literal: true
module Gitlab
module Importers
module DatabaseImporters
module CommonMetrics
module PrometheusMetricEnums
def self.groups
......
......@@ -2,7 +2,7 @@
require 'rails_helper'
describe Gitlab::Importers::CommonMetrics::Importer do
describe Gitlab::DatabaseImporters::CommonMetrics::Importer do
subject { described_class.new }
context "does import common_metrics.yml" do
......@@ -87,7 +87,7 @@ describe Gitlab::Importers::CommonMetrics::Importer do
let(:query_identifier) { }
it 'raises exception' do
expect { subject.execute }.to raise_error(Gitlab::Importers::CommonMetrics::Importer::MissingQueryId)
expect { subject.execute }.to raise_error(Gitlab::DatabaseImporters::CommonMetrics::Importer::MissingQueryId)
end
end
......
......@@ -2,7 +2,7 @@
require 'rails_helper'
describe Gitlab::Importers::CommonMetrics::PrometheusMetric do
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]
......@@ -14,6 +14,6 @@ describe Gitlab::Importers::CommonMetrics::PrometheusMetric do
end
it '.group_titles equals ::PrometheusMetric' do
expect(Gitlab::Importers::CommonMetrics::PrometheusMetricEnums.group_titles).to eq(existing_group_titles)
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