Tests: auth external in mail is explicitly enabled since 1.11.9.
diff --git a/mail_imap.t b/mail_imap.t
index cb0e9b6..544bec7 100644
--- a/mail_imap.t
+++ b/mail_imap.t
@@ -26,7 +26,7 @@
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 @@
server {
listen 127.0.0.1:8143;
protocol imap;
- imap_auth plain cram-md5;
+ imap_auth plain cram-md5 external;
}
}
@@ -92,7 +92,9 @@
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 @@
$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 @@
$s->send('1 AUTHENTICATE EXTERNAL ' . encode_base64('test@example.com', ''));
$s->ok('auth external with username');
-}
-
###############################################################################
diff --git a/mail_pop3.t b/mail_pop3.t
index f9924b8..07dcfbf 100644
--- a/mail_pop3.t
+++ b/mail_pop3.t
@@ -26,7 +26,7 @@
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 @@
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 @@
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 @@
$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 @@
$s->send('AUTH EXTERNAL ' . encode_base64('test@example.com', ''));
$s->ok('auth external with username');
-}
-
###############################################################################
diff --git a/mail_smtp.t b/mail_smtp.t
index b552d5f..7ebc6dd 100644
--- a/mail_smtp.t
+++ b/mail_smtp.t
@@ -27,7 +27,7 @@
local $SIG{PIPE} = 'IGNORE';
-my $t = Test::Nginx->new()->has(qw/mail smtp http rewrite/)->plan(30)
+my $t = Test::Nginx->new()->has(qw/mail smtp http rewrite/)
->write_file_expand('nginx.conf', <<'EOF');
%%TEST_GLOBALS%%
@@ -45,7 +45,7 @@
server {
listen 127.0.0.1:8025;
protocol smtp;
- smtp_auth login plain none cram-md5;
+ smtp_auth login plain none cram-md5 external;
}
}
@@ -90,7 +90,9 @@
EOF
$t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon);
-$t->run()->waitforsocket('127.0.0.1:' . port(8026));
+$t->try_run('no auth external')->plan(30);
+
+$t->waitforsocket('127.0.0.1:' . port(8026));
###############################################################################
@@ -161,9 +163,6 @@
$s->send(encode_base64('test@example.com ' . ('0' x 32), ''));
$s->authok('auth cram-md5');
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.11.6');
-
# Try auth external
$s = Test::Nginx::SMTP->new();
@@ -186,8 +185,6 @@
$s->send('AUTH EXTERNAL ' . encode_base64('test@example.com', ''));
$s->ok('auth external with username');
-}
-
# Try auth plain with pipelining
$s = Test::Nginx::SMTP->new();