diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-09-11 10:00:05 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-09-11 17:40:32 +0200 |
commit | fe8b842a755375e4ab9e716c5ab8c34ea868e96a (patch) | |
tree | be9afb21a4614543129ed35ec34b5251b79380be /spec/db | |
parent | b9ea4e35ac679a87ea16ca01a5f02bd96b3b16c3 (diff) | |
download | gitlab-ce-fe8b842a755375e4ab9e716c5ab8c34ea868e96a.tar.gz |
Use Rails.root for CommonMetricsImporter
Diffstat (limited to 'spec/db')
-rw-r--r-- | spec/db/importers/common_metrics_importer_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/db/importers/common_metrics_importer_spec.rb b/spec/db/importers/common_metrics_importer_spec.rb index 16b59e1dfe8..68260820958 100644 --- a/spec/db/importers/common_metrics_importer_spec.rb +++ b/spec/db/importers/common_metrics_importer_spec.rb @@ -47,6 +47,16 @@ describe Importers::CommonMetricsImporter do 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(:group) do |