Mercurial > hg > nginx-tests
comparison geo_unix.t @ 1573:d7e83ce613c2
Tests: unix sockets removal tests on master process exit.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 02 Jun 2020 14:30:27 +0300 |
parents | 144c6ce732e4 |
children | 5ac6efbe5552 |
comparison
equal
deleted
inserted
replaced
1572:f5a3b70c0f2f | 1573:d7e83ce613c2 |
---|---|
20 ############################################################################### | 20 ############################################################################### |
21 | 21 |
22 select STDERR; $| = 1; | 22 select STDERR; $| = 1; |
23 select STDOUT; $| = 1; | 23 select STDOUT; $| = 1; |
24 | 24 |
25 my $t = Test::Nginx->new()->has(qw/http geo proxy unix/)->plan(5); | 25 my $t = Test::Nginx->new()->has(qw/http geo proxy unix/)->plan(6); |
26 | 26 |
27 $t->write_file_expand('nginx.conf', <<'EOF'); | 27 $t->write_file_expand('nginx.conf', <<'EOF'); |
28 | 28 |
29 %%TEST_GLOBALS%% | 29 %%TEST_GLOBALS%% |
30 | 30 |
98 like($r, qr/^X-Addr: none/m, 'geo unix remote addr'); | 98 like($r, qr/^X-Addr: none/m, 'geo unix remote addr'); |
99 like($r, qr/^X-Ranges-Addr: none/m, 'geo unix ranges remote addr'); | 99 like($r, qr/^X-Ranges-Addr: none/m, 'geo unix ranges remote addr'); |
100 | 100 |
101 like(http_get('/?ip=192.0.2.1'), qr/^X-Arg: test/m, 'geo unix variable'); | 101 like(http_get('/?ip=192.0.2.1'), qr/^X-Arg: test/m, 'geo unix variable'); |
102 | 102 |
103 $t->stop(); | |
104 | |
105 TODO: { | |
106 local $TODO = 'not yet' unless $t->has_version('1.19.1'); | |
107 | |
108 is(-e $t->testdir() . '/unix.sock', undef, 'unix socket removed'); | |
109 | |
110 } | |
111 | |
103 ############################################################################### | 112 ############################################################################### |