diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-09-05 16:55:56 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-09-05 17:27:01 +0200 |
commit | a3fbaffc0c37d3885e667234bc6dfd739c922011 (patch) | |
tree | bf01f5509336665a8f65a3e4b398d2b99af166da /spec/db | |
parent | db467ad66d61be87533ddd2bfbac4d3577da5d38 (diff) | |
download | gitlab-ce-a3fbaffc0c37d3885e667234bc6dfd739c922011.tar.gz |
Test production/development fixtures seed
Diffstat (limited to 'spec/db')
-rw-r--r-- | spec/db/development/import_common_metrics_spec.rb | 15 | ||||
-rw-r--r-- | spec/db/production/import_common_metrics_spec.rb | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/spec/db/development/import_common_metrics_spec.rb b/spec/db/development/import_common_metrics_spec.rb new file mode 100644 index 00000000000..25061ef0887 --- /dev/null +++ b/spec/db/development/import_common_metrics_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require 'spec_helper' + +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 new file mode 100644 index 00000000000..1e4ff818a86 --- /dev/null +++ b/spec/db/production/import_common_metrics_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +require 'spec_helper' + +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 |