diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/lib/gitlab/utils/usage_data_spec.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/lib/gitlab/utils/usage_data_spec.rb')
-rw-r--r-- | spec/lib/gitlab/utils/usage_data_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/utils/usage_data_spec.rb b/spec/lib/gitlab/utils/usage_data_spec.rb index 11b2a12f228..8f705d6a487 100644 --- a/spec/lib/gitlab/utils/usage_data_spec.rb +++ b/spec/lib/gitlab/utils/usage_data_spec.rb @@ -377,7 +377,7 @@ RSpec.describe Gitlab::Utils::UsageData do shared_examples 'try to query Prometheus with given address' do context 'Prometheus is ready' do before do - stub_request(:get, /\/-\/ready/) + stub_request(:get, %r{/-/ready}) .to_return(status: 200, body: 'Prometheus is Ready.\n') end @@ -387,7 +387,7 @@ RSpec.describe Gitlab::Utils::UsageData do context 'Prometheus is not reachable through HTTPS' do before do - stub_request(:get, /https:\/\/.*/).to_raise(Errno::ECONNREFUSED) + stub_request(:get, %r{https://.*}).to_raise(Errno::ECONNREFUSED) end context 'Prometheus is reachable through HTTP' do @@ -396,7 +396,7 @@ RSpec.describe Gitlab::Utils::UsageData do context 'Prometheus is not reachable through HTTP' do before do - stub_request(:get, /http:\/\/.*/).to_raise(Errno::ECONNREFUSED) + stub_request(:get, %r{http://.*}).to_raise(Errno::ECONNREFUSED) end it_behaves_like 'does not query data from Prometheus' @@ -406,7 +406,7 @@ RSpec.describe Gitlab::Utils::UsageData do context 'Prometheus is not ready' do before do - stub_request(:get, /\/-\/ready/) + stub_request(:get, %r{/-/ready}) .to_return(status: 503, body: 'Service Unavailable') end |