diff options
Diffstat (limited to 'spec/services/prometheus/proxy_variable_substitution_service_spec.rb')
-rw-r--r-- | spec/services/prometheus/proxy_variable_substitution_service_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/services/prometheus/proxy_variable_substitution_service_spec.rb b/spec/services/prometheus/proxy_variable_substitution_service_spec.rb index 5982dcbc404..2435dda07b4 100644 --- a/spec/services/prometheus/proxy_variable_substitution_service_spec.rb +++ b/spec/services/prometheus/proxy_variable_substitution_service_spec.rb @@ -186,5 +186,19 @@ describe Prometheus::ProxyVariableSubstitutionService do end end end + + context '__range' do + let(:params_keys) do + { + query: 'topk(5, sum by (method) (rate(rest_client_requests_total[{{__range}}])))', + start_time: '2020-05-29T08:19:07.142Z', + end_time: '2020-05-29T16:19:07.142Z' + } + end + + it_behaves_like 'success' do + let(:expected_query) { "topk(5, sum by (method) (rate(rest_client_requests_total[#{8.hours.to_i}s])))" } + end + end end end |