diff options
author | David Wilkins <dwilkins@gitlab.com> | 2019-08-07 02:42:20 +0000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2019-08-07 02:42:20 +0000 |
commit | 467a411e8892ecd6a3be7cd2f6772665f2c63651 (patch) | |
tree | c7ee78a5f64224569be50ae2534e10ce566fe6df /spec/models/project_services | |
parent | b67ed9c96720864b9ddae973b34f7456c9321789 (diff) | |
download | gitlab-ce-467a411e8892ecd6a3be7cd2f6772665f2c63651.tar.gz |
Convert RestClient to Gitlab::HTTP for Prometheus Monitor
- Closes #60024
- Change PrometheusClient.new to accept a base url instead of an
already created RestClient
- Use Gitlab::HTTP in PrometheusClient instead of creating RestClient
in PrometheusService
- Move http_options from PrometheusService to
PrometheusClient (follow_redirects: false)
- ensure that base urls don't have the trailing slash
- Created a `PrometheusClient#url` method that might not be strictly
required
- Change rescued exceptions from RestClient::* to
HTTParty::ResponseError where possible and StandardError for the
rest
Diffstat (limited to 'spec/models/project_services')
-rw-r--r-- | spec/models/project_services/prometheus_service_spec.rb | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/spec/models/project_services/prometheus_service_spec.rb b/spec/models/project_services/prometheus_service_spec.rb index e9c7c94ad70..e5ac6ca65d6 100644 --- a/spec/models/project_services/prometheus_service_spec.rb +++ b/spec/models/project_services/prometheus_service_spec.rb @@ -105,10 +105,6 @@ describe PrometheusService, :use_clean_rails_memory_store_caching do context 'manual configuration is enabled' do let(:manual_configuration) { true } - it 'returns rest client from api_url' do - expect(service.prometheus_client.url).to eq(api_url) - end - it 'calls valid?' do allow(service).to receive(:valid?).and_call_original |