Mercurial > hg > nginx-tests
comparison mail_imap.t @ 1984:81519d01f238
Tests: added test that EXTERNAL mail auth clears old password.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 03 Jun 2024 18:15:22 +0300 |
parents | 2a0a6035a1af |
children |
comparison
equal
deleted
inserted
replaced
1983:c7315caf2110 | 1984:81519d01f238 |
---|---|
91 } | 91 } |
92 | 92 |
93 EOF | 93 EOF |
94 | 94 |
95 $t->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon); | 95 $t->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon); |
96 $t->run()->plan(29); | 96 $t->run()->plan(30); |
97 | 97 |
98 $t->waitforsocket('127.0.0.1:' . port(8144)); | 98 $t->waitforsocket('127.0.0.1:' . port(8144)); |
99 | 99 |
100 ############################################################################### | 100 ############################################################################### |
101 | 101 |
181 $s = Test::Nginx::IMAP->new(); | 181 $s = Test::Nginx::IMAP->new(); |
182 $s->read(); | 182 $s->read(); |
183 | 183 |
184 $s->send('1 AUTHENTICATE EXTERNAL ' . encode_base64('test@example.com', '')); | 184 $s->send('1 AUTHENTICATE EXTERNAL ' . encode_base64('test@example.com', '')); |
185 $s->ok('auth external with username'); | 185 $s->ok('auth external with username'); |
186 | |
187 # auth external after failed plain | |
188 | |
189 TODO: { | |
190 local $TODO = 'not yet' unless $t->has_version('1.27.1'); | |
191 | |
192 $s = Test::Nginx::IMAP->new(); | |
193 $s->read(); | |
194 | |
195 $s->send('1 AUTHENTICATE PLAIN ' | |
196 . encode_base64("\0test\@example.com\0bad", '')); | |
197 $s->read(); | |
198 | |
199 $s->send('1 AUTHENTICATE EXTERNAL ' . encode_base64('test@example.com', '')); | |
200 $s->ok('auth external after plain'); | |
201 | |
202 } | |
186 | 203 |
187 # quoted strings | 204 # quoted strings |
188 | 205 |
189 $s = Test::Nginx::IMAP->new(); | 206 $s = Test::Nginx::IMAP->new(); |
190 $s->read(); | 207 $s->read(); |