comparison upstream_hash_memcached.t @ 568:907e89fba9c3

Tests: removed TODO and try_run() checks for legacy versions.
author Sergey Kandaurov <pluknet@nginx.com>
date Sun, 03 May 2015 12:45:09 +0300
parents 020c4e47ecac
children dc97097100a5
comparison
equal deleted inserted replaced
567:22bade4c7e12 568:907e89fba9c3
27 plan(skip_all => 'Cache::Memcached not installed') if $@; 27 plan(skip_all => 'Cache::Memcached not installed') if $@;
28 eval { require Cache::Memcached::Fast; }; 28 eval { require Cache::Memcached::Fast; };
29 plan(skip_all => 'Cache::Memcached::Fast not installed') if $@; 29 plan(skip_all => 'Cache::Memcached::Fast not installed') if $@;
30 30
31 my $t = Test::Nginx->new()->has(qw/http rewrite memcached upstream_hash/) 31 my $t = Test::Nginx->new()->has(qw/http rewrite memcached upstream_hash/)
32 ->has_daemon('memcached')->write_file_expand('nginx.conf', <<'EOF'); 32 ->has_daemon('memcached')->plan(4);
33
34 $t->write_file_expand('nginx.conf', <<'EOF');
33 35
34 %%TEST_GLOBALS%% 36 %%TEST_GLOBALS%%
35 37
36 daemon off; 38 daemon off;
37 39
105 } 107 }
106 108
107 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8081', @memopts); 109 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8081', @memopts);
108 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8082', @memopts); 110 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8082', @memopts);
109 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8083', @memopts); 111 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8083', @memopts);
110 $t->try_run('no upstream hash')->plan(4); 112 $t->run();
111 113
112 $t->waitforsocket('127.0.0.1:8081') or die "Can't start memcached"; 114 $t->waitforsocket('127.0.0.1:8081') or die "Can't start memcached";
113 $t->waitforsocket('127.0.0.1:8082') or die "Can't start memcached"; 115 $t->waitforsocket('127.0.0.1:8082') or die "Can't start memcached";
114 $t->waitforsocket('127.0.0.1:8083') or die "Can't start memcached"; 116 $t->waitforsocket('127.0.0.1:8083') or die "Can't start memcached";
115 117