Improve e2e tests
- Add a test for mail splitting. - Cleanup the code, move common functionality into `common.sh`. - Reduce noise in the test output.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# source some functions
|
||||
. common.sh
|
||||
|
||||
test_header "Mail split"
|
||||
|
||||
create_unix_user karl
|
||||
KARL_FPR=$(gen_cert karl@example.com)
|
||||
authenticate $KARL_FPR
|
||||
|
||||
create_unix_user laura
|
||||
|
||||
echo -e "To: karl@example.com, Laura <laura@example.com>\nSubject: Testmail\n\nTestmail." | sendmail -t
|
||||
sleep 1
|
||||
|
||||
R=1
|
||||
if [ $(expect_mail karl encrypted) == 0 ] ; then
|
||||
if [ $(expect_mail laura unencrypted) == 0 ] ; then
|
||||
R=0
|
||||
fi
|
||||
fi
|
||||
|
||||
exit $R
|
||||
Reference in New Issue
Block a user