Mercurial > hg > nginx-tests
changeset 34:689174c36e94
Tests: memcached in 0.7.19 works only with next_upstream.
In 0.7.19 memcached module correctly handles keys not in memcached only if
configured with memcached_next_upstream not_found. Add a test to make sure
this workaround will work in the future.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 14 Oct 2008 22:42:18 +0400 |
parents | 4f57d57543e1 |
children | 7bf0e8a1d66c |
files | memcached.t |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/memcached.t +++ b/memcached.t @@ -26,7 +26,7 @@ select STDOUT; $| = 1; eval { require Cache::Memcached; }; plain(skip_all => 'Cache::Memcached not installed') if $@; -my $t = Test::Nginx->new()->has('rewrite')->has_daemon('memcached')->plan(2) +my $t = Test::Nginx->new()->has('rewrite')->has_daemon('memcached')->plan(3) ->write_file_expand('nginx.conf', <<'EOF'); master_process off; @@ -47,6 +47,12 @@ http { set $memcached_key $uri; memcached_pass 127.0.0.1:8081; } + + location /next { + set $memcached_key $uri; + memcached_next_upstream not_found; + memcached_pass 127.0.0.1:8081; + } } } @@ -62,5 +68,6 @@ my $memd = Cache::Memcached->new(servers like(http_get('/'), qr/SEE-THIS/, 'memcached request'); like(http_get('/notfound'), qr/404/, 'memcached not found'); +like(http_get('/next'), qr/404/, 'not found with memcached_next_upstream'); ###############################################################################