# HG changeset patch # User Maxim Dounin # Date 1604973809 -10800 # Node ID e4e0695552edc7d44281666bae8ee944c864f757 # Parent aa5a61d1254b1897a0a14ed59f0d5d0fd73e337e Tests: fixed stream_proxy_ssl_conf_command.t. The stream_proxy_ssl_conf_command.t test used stream return module to return the response. Since this ignores actual request, but the perl test code used http_get(). This might result in the request being sent after the response is returned and the connection closed by the server, resulting in RST being generated and no response seen by the client at all. Fix is to use "stream(...)->read()" instead of http_get(), so no request is sent at all, eliminating possibility of RST being generated. diff --git a/stream_proxy_ssl_conf_command.t b/stream_proxy_ssl_conf_command.t --- a/stream_proxy_ssl_conf_command.t +++ b/stream_proxy_ssl_conf_command.t @@ -16,6 +16,7 @@ BEGIN { use FindBin; chdir($FindBin::Bin use lib 'lib'; use Test::Nginx; +use Test::Nginx::Stream qw/ stream /; ############################################################################### @@ -81,6 +82,7 @@ foreach my $name ('localhost', 'override ############################################################################### -like(http_get('/'), qr/CN=override/, 'Certificate'); +like(stream('127.0.0.1:' . port(8080))->read(), qr/CN=override/, + 'Certificate'); ###############################################################################