Mercurial > hg > nginx-tests
diff proxy-noclose.t @ 29:71ea39729fa0
Tests: memcached module generic tests.
This also includes relevant framework improvements, notably the ability to
test presence of external daemons and to run them.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 11 Oct 2008 10:58:43 +0400 |
parents | fbda19df2fc4 |
children | 7bf0e8a1d66c |
line wrap: on
line diff
--- a/proxy-noclose.t +++ b/proxy-noclose.t @@ -77,25 +77,15 @@ EOF TODO: { local $TODO = 'not fixed yet, patches under review'; -like(http_request('/'), qr/SEE-THIS/, 'request to bad backend'); -like(http_request('/multi'), qr/AND-THIS/, 'bad backend - multiple packets'); -like(http_request('/nolen'), qr/SEE-THIS/, 'bad backend - no content length'); -like(http_request('/uselen'), qr/SEE-THIS/, 'content-length actually used'); +like(http_get('/'), qr/SEE-THIS/, 'request to bad backend'); +like(http_get('/multi'), qr/AND-THIS/, 'bad backend - multiple packets'); +like(http_get('/nolen'), qr/SEE-THIS/, 'bad backend - no content length'); +like(http_get('/uselen'), qr/SEE-THIS/, 'content-length actually used'); } ############################################################################### -sub http_request { - my ($url) = @_; - my $r = http(<<EOF); -GET $url HTTP/1.1 -Host: localhost -Connection: close - -EOF -} - sub http_noclose_daemon { my $server = IO::Socket::INET->new( Proto => 'tcp',