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

Reorder the regex to load files

parent 8dd75878
......@@ -11,7 +11,7 @@ module EE
override :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
......
......@@ -56,7 +56,7 @@ module Gitlab
class << self
def paths
@paths ||= [Rails.root.join('config', 'metrics', '*[^aggregates]', '*.yml')]
@paths ||= [Rails.root.join('config', 'metrics', '[^aggregates]*', '*.yml')]
end
def definitions(skip_validation: false)
......
......@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::Usage::Metric do
describe '#definition' 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
......
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