Mercurial > hg > nginx-tests
comparison stream_unix.t @ 974:882267679006
Tests: simplified parallel modifications in tests.
Mail tests were simplified in c227348453db.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Tue, 12 Jul 2016 17:39:03 +0300 |
parents | e9064d691790 |
children | f3ba4c74de31 |
comparison
equal
deleted
inserted
replaced
973:7d7aef8b9f3a | 974:882267679006 |
---|---|
41 upstream u { | 41 upstream u { |
42 server unix:%%TESTDIR%%/unix.sock; | 42 server unix:%%TESTDIR%%/unix.sock; |
43 } | 43 } |
44 | 44 |
45 server { | 45 server { |
46 listen 127.0.0.1:%%PORT_0%%; | 46 listen 127.0.0.1:8080; |
47 proxy_pass unix:%%TESTDIR%%/unix.sock; | 47 proxy_pass unix:%%TESTDIR%%/unix.sock; |
48 } | 48 } |
49 | 49 |
50 server { | 50 server { |
51 listen 127.0.0.1:%%PORT_1%%; | 51 listen 127.0.0.1:8081; |
52 proxy_pass u; | 52 proxy_pass u; |
53 } | 53 } |
54 } | 54 } |
55 | 55 |
56 EOF | 56 EOF |
69 | 69 |
70 ############################################################################### | 70 ############################################################################### |
71 | 71 |
72 my $str = 'SEE-THIS'; | 72 my $str = 'SEE-THIS'; |
73 | 73 |
74 is(stream('127.0.0.1:' . port(0))->io($str), $str, 'proxy'); | 74 is(stream('127.0.0.1:' . port(8080))->io($str), $str, 'proxy'); |
75 is(stream('127.0.0.1:' . port(1))->io($str), $str, 'upstream'); | 75 is(stream('127.0.0.1:' . port(8081))->io($str), $str, 'upstream'); |
76 | 76 |
77 ############################################################################### | 77 ############################################################################### |
78 | 78 |
79 sub stream_daemon { | 79 sub stream_daemon { |
80 my $server = IO::Socket::UNIX->new( | 80 my $server = IO::Socket::UNIX->new( |