diff options
author | syasonik <syasonik@gitlab.com> | 2019-04-25 06:03:50 +0300 |
---|---|---|
committer | syasonik <syasonik@gitlab.com> | 2019-04-25 08:35:05 +0300 |
commit | 4a5c48c47cccd8ce2b6bd6912ecff925122778f0 (patch) | |
tree | d67a72b736ed069afd1c11fa14b4a789bc3d5b0c /spec | |
parent | dde709912f0c186d569ec5fb3d1986b8184d81f1 (diff) |
Move MetricsDashboard to Metrics::Dashboard
Diffstat (limited to 'spec')
-rw-r--r-- | spec/fixtures/lib/gitlab/metrics/dashboard/sample_dashboard.yml (renamed from spec/fixtures/lib/gitlab/metrics_dashboard/sample_dashboard.yml) | 0 | ||||
-rw-r--r-- | spec/fixtures/lib/gitlab/metrics/dashboard/schemas/dashboard.json (renamed from spec/fixtures/lib/gitlab/metrics_dashboard/schemas/dashboard.json) | 8 | ||||
-rw-r--r-- | spec/fixtures/lib/gitlab/metrics/dashboard/schemas/metrics.json (renamed from spec/fixtures/lib/gitlab/metrics_dashboard/schemas/metrics.json) | 0 | ||||
-rw-r--r-- | spec/fixtures/lib/gitlab/metrics/dashboard/schemas/panel_groups.json (renamed from spec/fixtures/lib/gitlab/metrics_dashboard/schemas/panel_groups.json) | 0 | ||||
-rw-r--r-- | spec/fixtures/lib/gitlab/metrics/dashboard/schemas/panels.json (renamed from spec/fixtures/lib/gitlab/metrics_dashboard/schemas/panels.json) | 0 | ||||
-rw-r--r-- | spec/lib/gitlab/metrics/dashboard/processor_spec.rb (renamed from spec/lib/gitlab/metrics_dashboard/processor_spec.rb) | 6 | ||||
-rw-r--r-- | spec/lib/gitlab/metrics/dashboard/service_spec.rb (renamed from spec/lib/gitlab/metrics_dashboard/service_spec.rb) | 4 |
7 files changed, 7 insertions, 11 deletions
diff --git a/spec/fixtures/lib/gitlab/metrics_dashboard/sample_dashboard.yml b/spec/fixtures/lib/gitlab/metrics/dashboard/sample_dashboard.yml index c2d3d3d8aca..c2d3d3d8aca 100644 --- a/spec/fixtures/lib/gitlab/metrics_dashboard/sample_dashboard.yml +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/sample_dashboard.yml diff --git a/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/dashboard.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/dashboard.json index 2d7601b64b1..1ee1205e29a 100644 --- a/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/dashboard.json +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/dashboard.json @@ -1,16 +1,12 @@ { "type": "object", - "required": [ - "dashboard", - "priority", - "panel_groups" - ], + "required": ["dashboard", "priority", "panel_groups"], "properties": { "dashboard": { "type": "string" }, "priority": { "type": "number" }, "panel_groups": { "type": "array", - "items": { "$ref": "spec/fixtures/lib/gitlab/metrics_dashboard/schemas/panel_groups.json" } + "items": { "$ref": "spec/fixtures/lib/gitlab/metrics/dashboard/schemas/panel_groups.json" } } }, "additionalProperties": false diff --git a/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/metrics.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/metrics.json index 2d0af57ec2c..2d0af57ec2c 100644 --- a/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/metrics.json +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/metrics.json diff --git a/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/panel_groups.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/panel_groups.json index d7a390adcdc..d7a390adcdc 100644 --- a/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/panel_groups.json +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/panel_groups.json diff --git a/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/panels.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/panels.json index 1548daacd64..1548daacd64 100644 --- a/spec/fixtures/lib/gitlab/metrics_dashboard/schemas/panels.json +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/panels.json diff --git a/spec/lib/gitlab/metrics_dashboard/processor_spec.rb b/spec/lib/gitlab/metrics/dashboard/processor_spec.rb index 9a4897944c6..e27ba2f1f4e 100644 --- a/spec/lib/gitlab/metrics_dashboard/processor_spec.rb +++ b/spec/lib/gitlab/metrics/dashboard/processor_spec.rb @@ -2,10 +2,10 @@ require 'spec_helper' -describe Gitlab::MetricsDashboard::Processor do +describe Gitlab::Metrics::Dashboard::Processor do let(:project) { build(:project) } let(:environment) { build(:environment) } - let(:dashboard_yml) { YAML.load_file('spec/fixtures/lib/gitlab/metrics_dashboard/sample_dashboard.yml') } + let(:dashboard_yml) { YAML.load_file('spec/fixtures/lib/gitlab/metrics/dashboard/sample_dashboard.yml') } describe 'process' do let(:process_params) { [project, environment] } @@ -50,7 +50,7 @@ describe Gitlab::MetricsDashboard::Processor do shared_examples_for 'errors with message' do |expected_message| it 'raises a DashboardLayoutError' do - error_class = Gitlab::MetricsDashboard::Stages::BaseStage::DashboardLayoutError + error_class = Gitlab::Metrics::Dashboard::Stages::BaseStage::DashboardLayoutError expect { dashboard }.to raise_error(error_class, expected_message) end diff --git a/spec/lib/gitlab/metrics_dashboard/service_spec.rb b/spec/lib/gitlab/metrics/dashboard/service_spec.rb index d2b8231fbfb..3f82fd7ebf8 100644 --- a/spec/lib/gitlab/metrics_dashboard/service_spec.rb +++ b/spec/lib/gitlab/metrics/dashboard/service_spec.rb @@ -2,12 +2,12 @@ require 'spec_helper' -describe Gitlab::MetricsDashboard::Service, :use_clean_rails_memory_store_caching do +describe Gitlab::Metrics::Dashboard::Service, :use_clean_rails_memory_store_caching do let(:project) { build(:project) } let(:environment) { build(:environment) } describe 'get_dashboard' do - let(:dashboard_schema) { JSON.parse(fixture_file('lib/gitlab/metrics_dashboard/schemas/dashboard.json')) } + let(:dashboard_schema) { JSON.parse(fixture_file('lib/gitlab/metrics/dashboard/schemas/dashboard.json')) } it 'returns a json representation of the environment dashboard' do result = described_class.new(project, environment).get_dashboard |