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
+8 -17
View File
@@ -1,25 +1,16 @@
#!/usr/bin/bash
echo "Simple: Test encryption for available certificate"
# source some functions
. common.sh
test_header "Simple: Test encryption for available certificate"
# There is an authenticated certificate for bob in the cert store
adduser --shell /bin/bash --disabled-password --gecos "" bob
echo "test mail" | sendmail bob@example.com
create_unix_user bob
send_test_mail bob@example.com
sleep 1
RESULT_CODE=$(expect_mail bob encrypted)
if [ -f /var/mail/bob ] ; then
if grep -q "BEGIN PGP MESSAGE" /var/mail/bob ; then
RESULT_CODE=0
else
echo "no encryption detected"
RESULT_CODE=1
fi
else
echo "no mail detected"
RESULT_CODE=1
fi
deluser --remove-home bob
delete_unix_user bob
exit $RESULT_CODE