From 29a5afb169d6a4106fcdff8d3173938adfd8638c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florent=20Thi=C3=A9ry?= <florent.thiery@ubicast.eu>
Date: Thu, 23 Feb 2017 12:51:30 +0100
Subject: [PATCH] send mail to non existing address, fixes #20590

---
 tests/test_send_email.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/test_send_email.sh b/tests/test_send_email.sh
index 1ec62e16..302867d2 100755
--- a/tests/test_send_email.sh
+++ b/tests/test_send_email.sh
@@ -2,14 +2,15 @@
 # Copyright 2017, Florent Thiery
 # envoyer un mail contenant un truc random
 RAND="$RANDOM"
-EMAIL="deployment+$RAND@ubicast.eu"
+EMAIL="noreply+$RAND@ubicast.eu"
 echo "Sending email to $EMAIL"
 echo "This is a test email" | mail -s "Test email from `cat /etc/hostname`" $EMAIL
 sleep 10
 grep $EMAIL /var/log/mail.log | grep bounced > /dev/null
-if [ $? -e 0 ]; then
+if [ $? -eq 0 ]; then
     echo "Sending mail failed"
     exit 1
 fi
+echo "Sending mail succeeded"
 exit 0
 # check un webservice qui recoit le mail
-- 
GitLab