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,26 +1,17 @@
#!/usr/bin/bash
echo "Test encryption for certificate an a keyserver"
# source some functions
. common.sh
test_header "Test encryption for certificate an a keyserver"
# There is a certificate for carol on the keyserver
# it's certified by an introducer
adduser --shell /bin/bash --disabled-password --gecos "" carol
echo "test mail" | sendmail carol@example.com
create_unix_user carol
send_test_mail carol@example.com
sleep 1
RESULT_CODE=$(expect_mail carol encrypted)
if [ -f /var/mail/carol ] ; then
if grep -q "BEGIN PGP MESSAGE" /var/mail/carol ; 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 carol
delete_unix_user carol
exit $RESULT_CODE