Repository navigation
This release contains breaking changes.
Requires Elixir 1.15 or higher. #60
Breaking changes
- Moved all public functions from
TestServertoTestServer.HTTP#52 - Moved HTTP server adapters from
TestServer.HTTPServer.*toTestServer.HTTP.Server.*#52 - Renamed
add/1toTestServer.HTTP.handle/1; it now accepts the:methodoption instead of:viaand no longer accepts binary method value such as"POST"#61 #66 - Renamed
websocket_init/1toTestServer.HTTP.websocket/1; it now returns the WebSocket directly instead of{:ok, websocket}#63 - Renamed
websocket_info/2toTestServer.HTTP.websocket_send/2; it now accepts options as its second argument instead of a function #61 - Replaced
x509_suite/0withTestServer.HTTP.cacerts/0, which returns the CA certificates directly (8eb9416) - Changed
TestServer.HTTP.start/1to return{:error, reason}for startup failures, invalid options still raise #63 - Removed
suppress_warning: trueoption in favor oflog: falseoption #83 TestServer.HTTPnow defaults binding to:loopbackIP instead ofip: :any#83
Added
- Added SSH support with
TestServer.SSH#54 #70 #71 - Added TCP support with
TestServer.TCP#58 - Added UDP support with
TestServer.UDP#67 - Added buffered support for
Plug.Conn.send_chunked/2toTestServer.HTTP.Server.Httpd#78 - Added support for
Plug.Conn.send_file/3toTestServer.HTTP.Server.Httpd#78 - Added support for plug tuples in
TestServer.HTTP.plug/2andTestServer.HTTP.handle/2#83
Changed
- Made path argument optional for
TestServer.HTTP.handle/3andTestServer.HTTP.websocket/3#64 - Instance crashes now propagate to the test process instead of being silently ignored #72
Fixed
- Fixed bug where
:matchfunctions that raised errors always matched inTestServer.HTTP.handle/3andTestServer.HTTP.websocket_handle/2#57 - Fixed UTF-8 response body handling for
TestServer.HTTP.Server.Httpd#57 - Fixed UTF-8 header and request body handling for
TestServer.HTTP.Server.Httpd#73 - Fixed invalid host header port parsing in
TestServer.HTTP.Server.Httpd#57 - Fixed bracketed IPv6 host header parsing in
TestServer.HTTP.Server.Httpd#57 - Fixed query string parsing with extra
?segments inTestServer.HTTP.Server.Httpd#57 #78 - Fixed
:lengthoption support for request body reads inTestServer.HTTP.Server.Httpd#78 - Fixed
Banditserver adapter timeout when discarding an updated conn #65 (thanks @RumataEstor) - Fixed bug where the servers of
TestServer.HTTP.Server.Httpd,TestServer.HTTP.Server.Plug.Cowboy, andTestServer.SSH.Servercould outlive crashed test server instances #80
Big thanks to @richard-ash for helping with the refactor to multi protocol architecture.