Mercurial > hg > nginx-tests
comparison memcached.t @ 84:e48ac6e9a390
Tests: die if we failed to put test data into memcached.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sun, 12 Apr 2009 06:48:10 +0400 |
parents | 726c3c2a8b8c |
children | 1c0ec30614c6 |
comparison
equal
deleted
inserted
replaced
83:6e5884419e4a | 84:e48ac6e9a390 |
---|---|
66 or die "Can't start memcached"; | 66 or die "Can't start memcached"; |
67 | 67 |
68 ############################################################################### | 68 ############################################################################### |
69 | 69 |
70 my $memd = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ]); | 70 my $memd = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ]); |
71 $memd->set('/', 'SEE-THIS'); | 71 $memd->set('/', 'SEE-THIS') |
72 or die "can't put value into memcached: $!"; | |
72 | 73 |
73 like(http_get('/'), qr/SEE-THIS/, 'memcached request'); | 74 like(http_get('/'), qr/SEE-THIS/, 'memcached request'); |
74 | 75 |
75 like(http_get('/notfound'), qr/404/, 'memcached not found'); | 76 like(http_get('/notfound'), qr/404/, 'memcached not found'); |
76 | 77 |