Commit Graph

4 Commits

Author SHA1 Message Date
Alex Kalderimis e3a91089b7 Allow be_url to specify the type
This allows the be_url matcher to be more specific. By default, it only
matches HTTP and HTTPS URIs.
2019-08-30 04:43:16 +00:00
David Wilkins 467a411e88 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
2019-08-07 02:42:20 +00:00
Thong Kuah f0391c2517 Add frozen_string_literal to spec/support
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-07-25 17:33:34 +12:00
Kamil Trzcinski 6f714dfb4a Improve code design after code review 2016-11-16 23:10:27 +01:00