f0391c2517
Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
19 lines
432 B
Ruby
19 lines
432 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative './wait_for_requests'
|
|
|
|
module InspectRequests
|
|
extend self
|
|
include WaitForRequests
|
|
|
|
def inspect_requests(inject_headers: {})
|
|
Gitlab::Testing::RequestInspectorMiddleware.log_requests!(inject_headers)
|
|
|
|
yield
|
|
|
|
wait_for_all_requests
|
|
Gitlab::Testing::RequestInspectorMiddleware.requests
|
|
ensure
|
|
Gitlab::Testing::RequestInspectorMiddleware.stop_logging!
|
|
end
|
|
end
|