Commit b243c3ea authored by Pawel Chojnacki's avatar Pawel Chojnacki

Give metric query context rspec examples correctly sounding names. + missing whitespace

parent 6232543d
...@@ -51,6 +51,7 @@ module Gitlab ...@@ -51,6 +51,7 @@ module Gitlab
query[:query] %= context query[:query] %= context
client_query(query[:query], time: context[:timeframe_end]) client_query(query[:query], time: context[:timeframe_end])
end end
query[:result] = result&.map(&:deep_symbolize_keys) query[:result] = result&.map(&:deep_symbolize_keys)
query query
end end
......
...@@ -23,13 +23,13 @@ RSpec.shared_examples 'additional metrics query' do ...@@ -23,13 +23,13 @@ RSpec.shared_examples 'additional metrics query' do
subject! { described_class.new(client) } subject! { described_class.new(client) }
shared_examples 'query context containing environment slug and filter' do shared_examples 'query context containing environment slug and filter' do
it 'query context contains ci_environment_slug' do it 'contains ci_environment_slug' do
expect(subject).to receive(:query_metrics).with(hash_including(ci_environment_slug: environment.slug)) expect(subject).to receive(:query_metrics).with(hash_including(ci_environment_slug: environment.slug))
subject.query(*query_params) subject.query(*query_params)
end end
it 'query context contains environment filter' do it 'contains environment filter' do
expect(subject).to receive(:query_metrics).with( expect(subject).to receive(:query_metrics).with(
hash_including( hash_including(
environment_filter: "container_name!=\"POD\",environment=\"#{environment.slug}\"" environment_filter: "container_name!=\"POD\",environment=\"#{environment.slug}\""
......
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