Mercurial > hg > nginx-tests
comparison mail_ssl.t @ 1145:f193664e06d8
Tests: remove unused http block in mail_ssl.t.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Wed, 01 Mar 2017 23:49:13 +0300 |
parents | baeebac35a2e |
children | 796ed08cb215 |
comparison
equal
deleted
inserted
replaced
1144:66c7dee0431c | 1145:f193664e06d8 |
---|---|
32 Net::SSLeay::SSLeay_add_ssl_algorithms(); | 32 Net::SSLeay::SSLeay_add_ssl_algorithms(); |
33 Net::SSLeay::randomize(); | 33 Net::SSLeay::randomize(); |
34 }; | 34 }; |
35 plan(skip_all => 'Net::SSLeay not installed') if $@; | 35 plan(skip_all => 'Net::SSLeay not installed') if $@; |
36 | 36 |
37 my $t = Test::Nginx->new()->has(qw/mail mail_ssl imap pop3 http rewrite/) | 37 my $t = Test::Nginx->new()->has(qw/mail mail_ssl imap pop3/) |
38 ->has_daemon('openssl')->plan(16); | 38 ->has_daemon('openssl')->plan(16); |
39 | 39 |
40 $t->write_file_expand('nginx.conf', <<'EOF'); | 40 $t->write_file_expand('nginx.conf', <<'EOF'); |
41 | 41 |
42 %%TEST_GLOBALS%% | 42 %%TEST_GLOBALS%% |
52 ssl_session_tickets off; | 52 ssl_session_tickets off; |
53 | 53 |
54 # inherited by server "inherits" | 54 # inherited by server "inherits" |
55 ssl_password_file password_mail; | 55 ssl_password_file password_mail; |
56 | 56 |
57 proxy_pass_error_message on; | 57 auth_http http://127.0.0.1:8080; # unused |
58 auth_http http://127.0.0.1:8080/mail/auth; | |
59 | 58 |
60 ssl_session_cache none; | 59 ssl_session_cache none; |
61 | 60 |
62 server { | 61 server { |
63 listen 127.0.0.1:8143; | 62 listen 127.0.0.1:8143; |
124 listen 127.0.0.1:8152; | 123 listen 127.0.0.1:8152; |
125 protocol pop3; | 124 protocol pop3; |
126 | 125 |
127 ssl_password_file password; | 126 ssl_password_file password; |
128 starttls only; | 127 starttls only; |
129 } | |
130 } | |
131 | |
132 http { | |
133 %%TEST_GLOBALS_HTTP%% | |
134 | |
135 server { | |
136 listen 127.0.0.1:8080; | |
137 server_name localhost; | |
138 | |
139 location = /mail/auth { | |
140 add_header Auth-Status OK; | |
141 add_header Auth-Server 127.0.0.1; | |
142 add_header Auth-Port %%PORT_8144%%; | |
143 add_header Auth-Wait 1; | |
144 return 204; | |
145 } | |
146 } | 128 } |
147 } | 129 } |
148 | 130 |
149 EOF | 131 EOF |
150 | 132 |
174 | 156 |
175 $t->write_file('password', 'localhost'); | 157 $t->write_file('password', 'localhost'); |
176 $t->write_file('password_many', "wrong$CRLF" . "localhost$CRLF"); | 158 $t->write_file('password_many', "wrong$CRLF" . "localhost$CRLF"); |
177 $t->write_file('password_mail', 'inherits'); | 159 $t->write_file('password_mail', 'inherits'); |
178 | 160 |
179 $t->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon); | 161 $t->run(); |
180 $t->run()->waitforsocket('127.0.0.1:' . port(8144)); | |
181 | 162 |
182 ############################################################################### | 163 ############################################################################### |
183 | 164 |
184 # simple tests to ensure that nothing broke with ssl_password_file directive | 165 # simple tests to ensure that nothing broke with ssl_password_file directive |
185 | 166 |