Skip to content

Commit

Permalink
Fix an error while running HttpHelperTest
Browse files Browse the repository at this point in the history
The following error is shown on running "with insecure in transport
section" test while it doesn't affect to the test result.

  error: Async::Task [oid=0x2aac31a3b4f4] [pid=93890] [2021-02-05 18:48:20 +0900]
        |   NoMethodError: undefined method `status' for nil:NilClass
        |   → /home/aho/Projects/Fluentd/fluentd/test/plugin_helper/test_http_server_helper.rb:135 in `block in start_https_request'
        |     /home/aho/Projects/Fluentd/fluentd/vendor/bundle/ruby/2.6.0/gems/async-1.28.5/lib/async/task.rb:265 in `block in make_fiber'
  • Loading branch information
ashie committed Feb 15, 2021
1 parent cbb5b29 commit 2760aba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/plugin_helper/test_http_server_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ def start_https_request(addr, port, verify: true, cert_path: nil, selfsigned: tr
error = e
end

resp = Response.new(response.status.to_s, response.body.read, response.headers)
if response
resp = Response.new(response.status.to_s, response.body.read, response.headers)
end
end

if error
Expand Down

0 comments on commit 2760aba

Please sign in to comment.