Commit 0f37cc60 authored by Kerri Miller's avatar Kerri Miller

Merge branch 'mwaw/add_validation_of_metric_names' into 'master'

Add metric name suggestion to json schema

See merge request gitlab-org/gitlab!58287
parents c11b675f 44833dfa
......@@ -5,6 +5,10 @@
"key_path": {
"type": "string"
},
"name": {
"type": ["string", "null"],
"pattern": "^([a-z]+_)*[a-z]+$"
},
"description": {
"type": "string"
},
......
......@@ -16,7 +16,8 @@ RSpec.describe Gitlab::Usage::MetricDefinition do
time_frame: 'none',
data_source: 'database',
distribution: %w(ee ce),
tier: %w(free starter premium ultimate bronze silver gold)
tier: %w(free starter premium ultimate bronze silver gold),
name: 'count_boards'
}
end
......@@ -53,6 +54,7 @@ RSpec.describe Gitlab::Usage::MetricDefinition do
:distribution | nil
:distribution | 'test'
:tier | %w(test ee)
:name | 'count_<adjective_describing>_boards'
end
with_them do
......
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