From 26f9354ac25a53bf900574f3d3f73db49217f090 Mon Sep 17 00:00:00 2001 From: Christoph Galuschka Date: Mar 24 2012 18:16:38 +0000 Subject: hopefully really fixed dovecot test --- diff --git a/tests/p_dovecot/dovecot_imap_login.sh b/tests/p_dovecot/dovecot_imap_login.sh index 579b8e8..bba4a75 100755 --- a/tests/p_dovecot/dovecot_imap_login.sh +++ b/tests/p_dovecot/dovecot_imap_login.sh @@ -10,9 +10,20 @@ t_Log "Running $0 - adding imaptest local user account + attempting IMAP login" mkdir -m 700 -p /home/imaptest/mail/.imap/INBOX chown -R imaptest:imaptest /home/imaptest/mail/.imap/INBOX +ret_val=1 + t_Log "Dovecot IMAP login test" echo -e "01 LOGIN imaptest imaptest\n" | nc localhost 143 | grep -q "Logged in." +ret_val=$? + +if [ $ret_val == 1 ] + then + t_Log "Sometimes the first login fails (reason yet unknown to me)" + t_Log "Trying a second time, as this seems to work, if not somethings really not working" + echo -e "01 LOGIN imaptest imaptest\n" | nc localhost 143 | grep -q "Logged in." + ret_val=$? +fi -t_CheckExitStatus $? +t_CheckExitStatus $ret_val userdel -rf imaptest