Mercurial > hg > nginx-tests
comparison memcached.t @ 41:1b3c22a87e5d
Tests: add some HEAD tests.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sat, 01 Nov 2008 16:19:28 +0300 |
parents | bd1a5e92d0c0 |
children | d68b85def521 |
comparison
equal
deleted
inserted
replaced
40:3325fa3f515c | 41:1b3c22a87e5d |
---|---|
22 select STDOUT; $| = 1; | 22 select STDOUT; $| = 1; |
23 | 23 |
24 eval { require Cache::Memcached; }; | 24 eval { require Cache::Memcached; }; |
25 plain(skip_all => 'Cache::Memcached not installed') if $@; | 25 plain(skip_all => 'Cache::Memcached not installed') if $@; |
26 | 26 |
27 my $t = Test::Nginx->new()->has('rewrite')->has_daemon('memcached')->plan(3) | 27 my $t = Test::Nginx->new()->has('rewrite')->has_daemon('memcached')->plan(4) |
28 ->write_file_expand('nginx.conf', <<'EOF'); | 28 ->write_file_expand('nginx.conf', <<'EOF'); |
29 | 29 |
30 master_process off; | 30 master_process off; |
31 daemon off; | 31 daemon off; |
32 | 32 |
70 | 70 |
71 like(http_get('/'), qr/SEE-THIS/, 'memcached request'); | 71 like(http_get('/'), qr/SEE-THIS/, 'memcached request'); |
72 like(http_get('/notfound'), qr/404/, 'memcached not found'); | 72 like(http_get('/notfound'), qr/404/, 'memcached not found'); |
73 like(http_get('/next'), qr/404/, 'not found with memcached_next_upstream'); | 73 like(http_get('/next'), qr/404/, 'not found with memcached_next_upstream'); |
74 | 74 |
75 unlike(http_head('/'), qr/SEE-THIS/, 'memcached no data in HEAD'); | |
76 | |
75 ############################################################################### | 77 ############################################################################### |