summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-08-31 18:53:50 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2018-09-04 12:19:22 +0200
commit0a9d771bcba036971ebc076112c4a62f2179e372 (patch)
tree5445b484556e0946931e002147cf40a2d6c1afa0 /spec/factories
parent05ee94beb70a2969b85563a0c41bf5afe48a3699 (diff)
downloadgitlab-ce-0a9d771bcba036971ebc076112c4a62f2179e372.tar.gz
Import common metrics into database.
This MR backports PrometheusMetric model to CE and adds: common, identifier to figure out what kind of metric is used.
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/prometheus_metrics.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/factories/prometheus_metrics.rb b/spec/factories/prometheus_metrics.rb
new file mode 100644
index 00000000000..0ab237d6b3e
--- /dev/null
+++ b/spec/factories/prometheus_metrics.rb
@@ -0,0 +1,16 @@
+FactoryBot.define do
+ factory :prometheus_metric, class: PrometheusMetric do
+ title 'title'
+ query 'avg(metric)'
+ y_label 'y_label'
+ unit 'm/s'
+ group :business
+ project
+ legend 'legend'
+
+ trait :common do
+ common true
+ project nil
+ end
+ end
+end