mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/net/http: Examine webrick log.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f367fe81b1
commit
0babd24827
4 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun Nov 9 11:48:40 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/net/http: Examine webrick log.
|
||||
|
||||
Sun Nov 9 11:45:19 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||
|
||||
* gems/bundled_gems: upgraded to test-unit 3.0.5.
|
||||
|
|
|
@ -277,6 +277,7 @@ module TestNetHTTP_version_1_1_methods
|
|||
end
|
||||
}
|
||||
assert_equal 1, i
|
||||
@log_pattern = nil # server may encount ECONNRESET
|
||||
end
|
||||
|
||||
def test_get__implicit_start
|
||||
|
|
|
@ -117,6 +117,7 @@ class TestNetHTTPS < Test::Unit::TestCase
|
|||
end
|
||||
}
|
||||
assert_match(/certificate verify failed/, ex.message)
|
||||
@log_pattern = /ERROR OpenSSL::SSL::SSLError:/
|
||||
end
|
||||
|
||||
def test_identity_verify_failure
|
||||
|
|
|
@ -36,16 +36,19 @@ module TestNetHTTPUtils
|
|||
@server.shutdown
|
||||
@server_thread.join
|
||||
end
|
||||
assert_match(@log_pattern, @log.string) if @log_pattern
|
||||
# resume global state
|
||||
Net::HTTP.version_1_2
|
||||
end
|
||||
|
||||
def spawn_server
|
||||
@log = StringIO.new('')
|
||||
@log_pattern = /\A\z/
|
||||
@config = self.class::CONFIG
|
||||
server_config = {
|
||||
:BindAddress => config('host'),
|
||||
:Port => 0,
|
||||
:Logger => WEBrick::Log.new(NullWriter.new),
|
||||
:Logger => WEBrick::Log.new(@log, WEBrick::BasicLog::WARN),
|
||||
:AccessLog => [],
|
||||
:ServerType => Thread,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue