Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2024-01-05 21:21:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-05 21:21:08 +0300
commit534ce3b2d0a6ec24de9c370e5b85c9528ff63e34 (patch)
tree4ad964818b181fddc0925e33b63f9b1f2ded23d3 /spec/support/helpers/stub_requests.rb
parent4ba8ae97071935c39216afc53304c60386bbfa68 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/helpers/stub_requests.rb')
-rw-r--r--spec/support/helpers/stub_requests.rb18
1 files changed, 5 insertions, 13 deletions
diff --git a/spec/support/helpers/stub_requests.rb b/spec/support/helpers/stub_requests.rb
index bde5535705e..b77b366e037 100644
--- a/spec/support/helpers/stub_requests.rb
+++ b/spec/support/helpers/stub_requests.rb
@@ -18,15 +18,15 @@ module StubRequests
end
def stub_dns(url, ip_address:, port: 80)
- debug_with_puts "beginning of stub_dns"
+ DebugWithPuts.debug_with_puts "beginning of stub_dns"
url = parse_url(url)
- debug_with_puts "before socket = Socket.sockaddr_in"
+ DebugWithPuts.debug_with_puts "before socket = Socket.sockaddr_in"
socket = Socket.sockaddr_in(port, ip_address)
- debug_with_puts "after socket = Socket.sockaddr_in"
+ DebugWithPuts.debug_with_puts "after socket = Socket.sockaddr_in"
- debug_with_puts "before addr = Addrinfo.new(socket)"
+ DebugWithPuts.debug_with_puts "before addr = Addrinfo.new(socket)"
addr = Addrinfo.new(socket)
- debug_with_puts "after addr = Addrinfo.new(socket)"
+ DebugWithPuts.debug_with_puts "after addr = Addrinfo.new(socket)"
# See Gitlab::UrlBlocker
allow(Addrinfo).to receive(:getaddrinfo)
@@ -58,12 +58,4 @@ module StubRequests
def parse_url(url)
url.is_a?(URI) ? url : URI(url)
end
-
- # TODO: Remove the debug_with_puts statements below! Used for debugging purposes.
- # TODO: https://gitlab.com/gitlab-org/quality/engineering-productivity/team/-/issues/323#note_1688925316
- def debug_with_puts(message)
- return unless ENV['CI'] # rubocop:disable RSpec/AvoidConditionalStatements -- Debug information only in the CI
-
- puts "[#{Time.current}] #{message}"
- end
end