diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-24 03:09:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-24 03:09:24 +0300 |
commit | 2711c26beaca6c3a5a3be4b65e01557faf0185b6 (patch) | |
tree | 25d0c2ddb47e87712044884f558a9104c686805f /spec/lib/gitlab/prometheus_client_spec.rb | |
parent | 8a7aaf86831d2a556578ae558a4fcab8bb659b20 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/prometheus_client_spec.rb')
-rw-r--r-- | spec/lib/gitlab/prometheus_client_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/prometheus_client_spec.rb b/spec/lib/gitlab/prometheus_client_spec.rb index 4f9315e28e9..5eb133a5bf4 100644 --- a/spec/lib/gitlab/prometheus_client_spec.rb +++ b/spec/lib/gitlab/prometheus_client_spec.rb @@ -193,23 +193,23 @@ describe Gitlab::PrometheusClient do let(:time_stop) { Time.now.in_time_zone("Warsaw") } let(:time_start) { time_stop - 8.hours } - let(:query_url) { prometheus_query_range_url(prometheus_query, start: time_start.utc.to_f, stop: time_stop.utc.to_f) } + let(:query_url) { prometheus_query_range_url(prometheus_query, start_time: time_start.utc.to_f, end_time: time_stop.utc.to_f) } it 'passed dates are properly converted to utc' do req_stub = stub_prometheus_request(query_url, body: prometheus_values_body('vector')) - subject.query_range(prometheus_query, start: time_start, stop: time_stop) + subject.query_range(prometheus_query, start_time: time_start, end_time: time_stop) expect(req_stub).to have_been_requested end end context 'when a start time is passed' do - let(:query_url) { prometheus_query_range_url(prometheus_query, start: 2.hours.ago) } + let(:query_url) { prometheus_query_range_url(prometheus_query, start_time: 2.hours.ago) } it 'passed it in the requested URL' do req_stub = stub_prometheus_request(query_url, body: prometheus_values_body('vector')) - subject.query_range(prometheus_query, start: 2.hours.ago) + subject.query_range(prometheus_query, start_time: 2.hours.ago) expect(req_stub).to have_been_requested end end |