Skip to content

v1.0.0

Latest

Choose a tag to compare

@danschultzer danschultzer released this 04 Dec 00:26
· 2 commits to main since this release

This release contains breaking changes.

Requires Elixir 1.15 or higher. #60

Breaking changes

  • Moved all public functions from TestServer to TestServer.HTTP #52
  • Moved HTTP server adapters from TestServer.HTTPServer.* to TestServer.HTTP.Server.* #52
  • Renamed add/1 to TestServer.HTTP.handle/1; it now accepts the :method option instead of :via and no longer accepts binary method value such as "POST" #61 #66
  • Renamed websocket_init/1 to TestServer.HTTP.websocket/1; it now returns the WebSocket directly instead of {:ok, websocket} #63
  • Renamed websocket_info/2 to TestServer.HTTP.websocket_send/2; it now accepts options as its second argument instead of a function #61
  • Replaced x509_suite/0 with TestServer.HTTP.cacerts/0, which returns the CA certificates directly (8eb9416)
  • Changed TestServer.HTTP.start/1 to return {:error, reason} for startup failures, invalid options still raise #63
  • Removed suppress_warning: true option in favor of log: false option #83
  • TestServer.HTTP now defaults binding to :loopback IP instead of ip: :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/2 to TestServer.HTTP.Server.Httpd #78
  • Added support for Plug.Conn.send_file/3 to TestServer.HTTP.Server.Httpd #78
  • Added support for plug tuples in TestServer.HTTP.plug/2 and TestServer.HTTP.handle/2#83

Changed

  • Made path argument optional for TestServer.HTTP.handle/3 and TestServer.HTTP.websocket/3 #64
  • Instance crashes now propagate to the test process instead of being silently ignored #72

Fixed

  • Fixed bug where :match functions that raised errors always matched in TestServer.HTTP.handle/3 and TestServer.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 in TestServer.HTTP.Server.Httpd #57 #78
  • Fixed :length option support for request body reads in TestServer.HTTP.Server.Httpd #78
  • Fixed Bandit server 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, and TestServer.SSH.Server could outlive crashed test server instances #80

Big thanks to @richard-ash for helping with the refactor to multi protocol architecture.