diff mail_imap.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 766bcbb632ee
line wrap: on
line diff
--- a/mail_imap.t
+++ b/mail_imap.t
@@ -26,7 +26,7 @@ select STDOUT; $| = 1;
 
 local $SIG{PIPE} = 'IGNORE';
 
-my $t = Test::Nginx->new()->has(qw/mail imap http rewrite/)->plan(14)
+my $t = Test::Nginx->new()->has(qw/mail imap http rewrite/)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -43,7 +43,7 @@ mail {
     server {
         listen     127.0.0.1:8143;
         protocol   imap;
-        imap_auth  plain cram-md5;
+        imap_auth  plain cram-md5 external;
     }
 }
 
@@ -92,7 +92,9 @@ http {
 EOF
 
 $t->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon);
-$t->run()->waitforsocket('127.0.0.1:' . port(8144));
+$t->try_run('no auth external')->plan(14);
+
+$t->waitforsocket('127.0.0.1:' . port(8144));
 
 ###############################################################################
 
@@ -148,9 +150,6 @@ my $s = Test::Nginx::IMAP->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::IMAP->new();
@@ -170,6 +169,4 @@ local $TODO = 'not yet' unless $t->has_v
 $s->send('1 AUTHENTICATE EXTERNAL ' . encode_base64('test@example.com', ''));
 $s->ok('auth external with username');
 
-}
-
 ###############################################################################