Skip to content
Snippets Groups Projects
Commit 0add1eee authored by Florent Thiery's avatar Florent Thiery
Browse files

make test more clever, refs #20590

parent 7be39c81
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
# Copyright 2017, Florent Thiery # Copyright 2017, Florent Thiery
# envoyer un mail contenant un truc random # envoyer un mail contenant un truc random
echo "This is a test email" | mail -s "Test email from `cat /etc/hostname`" deployment@ubicast.eu RAND="$RANDOM"
EMAIL="deployment+$RAND@ubicast.eu"
echo "This is a test email" | mail -s "Test email from `cat /etc/hostname`" $EMAIL
sleep 10 sleep 10
tail -n 10 /var/log/mail.log | grep bounced grep $EMAIL /var/log/mail.log | grep bounced
if [ $? -na 0 ]; then if [ $? -ne 0 ]; then
echo "Sending mail failed" echo "Sending mail failed"
exit 1 exit 1
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment