[ruby/net-http] Split POST test because new dummy server can't handle continuouse POST request

54a99b9f0c
This commit is contained in:
Hiroshi SHIBATA 2024-07-10 19:32:23 +09:00 committed by git
parent e77bc17e5d
commit b11aba503b

View file

@ -442,7 +442,11 @@ module TestNetHTTP_version_1_1_methods
def test_post
start {|http|
_test_post__base http
}
start {|http|
_test_post__file http
}
start {|http|
_test_post__no_data http
}
end
@ -629,10 +633,12 @@ module TestNetHTTP_version_1_2_methods
# _test_request__range http # WEBrick does not support Range: header.
_test_request__HEAD http
_test_request__POST http
_test_request__stream_body http
_test_request__uri http
_test_request__uri_host http
}
start {|http|
_test_request__stream_body http
}
end
def _test_request__GET(http)
@ -843,8 +849,13 @@ Content-Type: application/octet-stream
__EOM__
start {|http|
_test_set_form_urlencoded(http, data.reject{|k,v|!v.is_a?(String)})
}
start {|http|
@server.mount('/', lambda {|req, res| res.body = req.body })
_test_set_form_multipart(http, false, data, expected)
}
start {|http|
@server.mount('/', lambda {|req, res| res.body = req.body })
_test_set_form_multipart(http, true, data, expected)
}
}