Add test framework to test

- Mail encryption (when expected)
- Introducer listing, adding and removing
- Locals listing, adding and removing
This commit is contained in:
Malte Meiboom
2026-05-20 14:27:28 +02:00
parent aed368e90d
commit 1f8d7e9a3f
19 changed files with 303 additions and 96 deletions
+7 -10
View File
@@ -1,18 +1,15 @@
#!/usr/bin/bash
echo "Basic: Test if MTA is working"
# source some functions
. common.sh
adduser --shell /bin/bash --disabled-password --gecos "" mtatest
echo "test mail" | sendmail mtatest@example.com
test_header "Basic: Test if MTA is working"
sleep 1
create_unix_user mtatest
send_test_mail mtatest@example.com
if [ -f /var/mail/mtatest ] ; then
RESULT_CODE=0
else
RESULT_CODE=1
fi
RESULT_CODE=$(expect_mail mtatest delivered)
deluser --remove-home mtatest
delete_unix_user mtatest
exit $RESULT_CODE