Commit 7d843f52 authored by Rajendra Kadam's avatar Rajendra Kadam

Reorder the regex to load files

parent 8dd75878
...@@ -11,7 +11,7 @@ module EE ...@@ -11,7 +11,7 @@ module EE
override :paths override :paths
def paths def paths
@ee_paths ||= [Rails.root.join('ee', 'config', 'metrics', '*[^aggregates]', '*.yml')] + super @ee_paths ||= [Rails.root.join('ee', 'config', 'metrics', '[^aggregates]*', '*.yml')] + super
end end
end end
end end
......
...@@ -56,7 +56,7 @@ module Gitlab ...@@ -56,7 +56,7 @@ module Gitlab
class << self class << self
def paths def paths
@paths ||= [Rails.root.join('config', 'metrics', '*[^aggregates]', '*.yml')] @paths ||= [Rails.root.join('config', 'metrics', '[^aggregates]*', '*.yml')]
end end
def definitions(skip_validation: false) def definitions(skip_validation: false)
......
...@@ -5,7 +5,7 @@ require 'spec_helper' ...@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Usage::Metric do RSpec.describe Gitlab::Usage::Metric do
describe '#definition' do describe '#definition' do
it 'returns key_path metric definiton' do it 'returns key_path metric definiton' do
expect(described_class.new(key_path: 'counts.issues').definition).to be_an(Gitlab::Usage::MetricDefinition) expect(described_class.new(key_path: 'uuid').definition).to be_an(Gitlab::Usage::MetricDefinition)
end end
end end
......
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