summaryrefslogtreecommitdiff
path: root/spec/tasks/gitlab/usage_data_rake_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/tasks/gitlab/usage_data_rake_spec.rb')
-rw-r--r--spec/tasks/gitlab/usage_data_rake_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/tasks/gitlab/usage_data_rake_spec.rb b/spec/tasks/gitlab/usage_data_rake_spec.rb
index 2a596946d86..0ee6fbef53f 100644
--- a/spec/tasks/gitlab/usage_data_rake_spec.rb
+++ b/spec/tasks/gitlab/usage_data_rake_spec.rb
@@ -6,7 +6,14 @@ RSpec.describe 'gitlab:usage data take tasks' do
before do
Rake.application.rake_require 'tasks/gitlab/usage_data'
# stub prometheus external http calls https://gitlab.com/gitlab-org/gitlab/-/issues/245277
- stub_request(:get, %r{^http://::1:9090/api/v1/query\?query=.*})
+ stub_request(:get, %r{^http[s]?://::1:9090/-/ready})
+ .to_return(
+ status: 200,
+ body: [{}].to_json,
+ headers: { 'Content-Type' => 'application/json' }
+ )
+
+ stub_request(:get, %r{^http[s]?://::1:9090/api/v1/query\?query=.*})
.to_return(
status: 200,
body: [{}].to_json,