diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-06-25 10:57:29 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-07-25 09:39:39 +0100 |
commit | eb7c08c7a644fa07b274b83624005ac53acf7faf (patch) | |
tree | 08102d7589a06e1aa550d1703a79f845b9333610 /spec/support | |
parent | 4063141223f9b89248e3c33df5711201f75d3718 (diff) | |
download | gitlab-ce-eb7c08c7a644fa07b274b83624005ac53acf7faf.tar.gz |
Backports relevant changes made in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5163 to CE
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/prometheus/additional_metrics_shared_examples.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/support/prometheus/additional_metrics_shared_examples.rb b/spec/support/prometheus/additional_metrics_shared_examples.rb index c7c3346d39e..0fd67531c3b 100644 --- a/spec/support/prometheus/additional_metrics_shared_examples.rb +++ b/spec/support/prometheus/additional_metrics_shared_examples.rb @@ -25,7 +25,7 @@ RSpec.shared_examples 'additional metrics query' do shared_examples 'query context containing environment slug and filter' do it 'contains ci_environment_slug' do - expect(subject).to receive(:query_metrics).with(project, hash_including(ci_environment_slug: environment.slug)) + expect(subject).to receive(:query_metrics).with(project, environment, hash_including(ci_environment_slug: environment.slug)) subject.query(*query_params) end @@ -33,6 +33,7 @@ RSpec.shared_examples 'additional metrics query' do it 'contains environment filter' do expect(subject).to receive(:query_metrics).with( project, + environment, hash_including( environment_filter: "container_name!=\"POD\",environment=\"#{environment.slug}\"" ) @@ -50,7 +51,7 @@ RSpec.shared_examples 'additional metrics query' do it_behaves_like 'query context containing environment slug and filter' it 'query context contains kube_namespace' do - expect(subject).to receive(:query_metrics).with(project, hash_including(kube_namespace: kube_namespace)) + expect(subject).to receive(:query_metrics).with(project, environment, hash_including(kube_namespace: kube_namespace)) subject.query(*query_params) end @@ -74,7 +75,7 @@ RSpec.shared_examples 'additional metrics query' do it_behaves_like 'query context containing environment slug and filter' it 'query context contains empty kube_namespace' do - expect(subject).to receive(:query_metrics).with(project, hash_including(kube_namespace: '')) + expect(subject).to receive(:query_metrics).with(project, environment, hash_including(kube_namespace: '')) subject.query(*query_params) end |