Add end-to-end Test
- Add an infrastructur to run local e2e tests. - Add some tests.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
echo "Simple: Test encryption for unavailable certificate"
|
||||
|
||||
# There is no authenticated certificate for alice in the cert store
|
||||
adduser --shell /bin/bash --disabled-password --gecos "" alice
|
||||
echo "test mail" | sendmail alice@example.com
|
||||
|
||||
sleep 1
|
||||
|
||||
if [ -f /var/mail/alice ] ; then
|
||||
if grep -q "BEGIN PGP MESSAGE" /var/mail/alice ; then
|
||||
echo "encryption detected - that is wrong"
|
||||
RESULT_CODE=1
|
||||
else
|
||||
RESULT_CODE=0
|
||||
fi
|
||||
else
|
||||
echo "no mail detected"
|
||||
RESULT_CODE=1
|
||||
fi
|
||||
|
||||
deluser --remove-home alice
|
||||
|
||||
exit $RESULT_CODE
|
||||
Reference in New Issue
Block a user