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:
Malte Meiboom
2026-07-09 12:55:10 +02:00
parent ca58d73050
commit 8b2f284916
5 changed files with 82 additions and 77 deletions
+24
View File
@@ -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