diff mail_pop3.t @ 1111:6c2538ad642d

Tests: auth external in mail is explicitly enabled since 1.11.9.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 12 Jan 2017 19:23:14 +0300
parents b9b115a2a28d
children 2634d0ef48d3
line wrap: on
line diff
--- a/mail_pop3.t
+++ b/mail_pop3.t
@@ -26,7 +26,7 @@ select STDOUT; $| = 1;
 
 local $SIG{PIPE} = 'IGNORE';
 
-my $t = Test::Nginx->new()->has(qw/mail pop3 http rewrite/)->plan(18)
+my $t = Test::Nginx->new()->has(qw/mail pop3 http rewrite/)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -43,7 +43,7 @@ mail {
     server {
         listen     127.0.0.1:8110;
         protocol   pop3;
-        pop3_auth  plain apop cram-md5;
+        pop3_auth  plain apop cram-md5 external;
     }
 }
 
@@ -92,7 +92,9 @@ http {
 EOF
 
 $t->run_daemon(\&Test::Nginx::POP3::pop3_test_daemon);
-$t->run()->waitforsocket('127.0.0.1:' . port(8111));
+$t->try_run('no auth external')->plan(18);
+
+$t->waitforsocket('127.0.0.1:' . port(8111));
 
 ###############################################################################
 
@@ -165,9 +167,6 @@ my $s = Test::Nginx::POP3->new();
 $s->send(encode_base64('test@example.com ' . ('0' x 32), ''));
 $s->ok('auth cram-md5');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.11.6');
-
 # auth external
 
 $s = Test::Nginx::POP3->new();
@@ -187,6 +186,4 @@ local $TODO = 'not yet' unless $t->has_v
 $s->send('AUTH EXTERNAL ' . encode_base64('test@example.com', ''));
 $s->ok('auth external with username');
 
-}
-
 ###############################################################################