# HG changeset patch # User Andrey Zelenkov # Date 1501076568 -10800 # Node ID 08f6eacf1cfe6cc784a16effd1c8b108d0160c51 # Parent cd153f1bbaad5c8493cd23092024a5b3ec7b598e Tests: stream proxy next upstream with ssl_preread (ticket #1317). Ensure that next TCP upstream can be selected with pending buffers. diff --git a/stream_ssl_preread.t b/stream_ssl_preread.t --- a/stream_ssl_preread.t +++ b/stream_ssl_preread.t @@ -50,6 +50,11 @@ stream { server 127.0.0.1:8092; } + upstream next { + server 127.0.0.1:8094; + server 127.0.0.1:8080; + } + ssl_preread on; server { @@ -78,6 +83,14 @@ stream { access_log %%TESTDIR%%/status.log status; } + server { + listen 127.0.0.1:8084; + proxy_pass next; + + proxy_connect_timeout 2s; + preread_buffer_size 8; + } + ssl_certificate_key localhost.key; ssl_certificate localhost.crt; @@ -109,7 +122,7 @@ eval { }; plan(skip_all => 'Net::SSLeay with OpenSSL SNI support required') if $@; -$t->plan(11); +$t->plan(12); $t->write_file('openssl.conf', <io('x' x 1000), "127.0.0.1:$p3", 'not a handshake'); +TODO: { +local $TODO = 'not yet'; + +is(stream("127.0.0.1:$p4")->io('x' x 16), "127.0.0.1:$p3", + 'pending buffers on next upstream'); + +} + # no junk in variable due to short ClientHello length value is(get_short(), "127.0.0.1:$p3", 'short client hello');