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

inspect_requests.rb « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 88ddc5c7f6c727c13db0cb219fd338b07826c4ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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