1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class LoggingTest < ActionDispatch::IntegrationTest
12 logcopy = ActiveSupport::Logger.new(buf)
15 Rails.logger.extend(ActiveSupport::Logger.broadcast(logcopy))
16 get "/arvados/v1/collections/#{collections(:foo_file).uuid}",
17 params: {:format => :json},
18 headers: auth(:active).merge({ 'X-Request-Id' => 'req-aaaaaaaaaaaaaaaaaaaa' })
19 assert_response :success
20 assert_match /^{.*"request_id":"req-aaaaaaaaaaaaaaaaaaaa"/, buf.string
22 # We don't seem to have an "unbroadcast" option, so this is how
23 # we avoid filling buf with unlimited logs from subsequent
25 logcopy.level = :fatal