full test: decrypt and print messages
This commit is contained in:
parent
d122e9033e
commit
3af4ffe36c
2 changed files with 10 additions and 1 deletions
|
@ -66,7 +66,6 @@ schleuder:
|
||||||
# Run a second time - should be idempotent and not trigger any new mails
|
# Run a second time - should be idempotent and not trigger any new mails
|
||||||
- python3 -m coverage run --rcfile=setup.cfg -m multischleuder --config test/multischleuder.yml --verbose
|
- python3 -m coverage run --rcfile=setup.cfg -m multischleuder --config test/multischleuder.yml --verbose
|
||||||
- sleep 5 # wait for mail delivery
|
- sleep 5 # wait for mail delivery
|
||||||
- cat /var/spool/mail/root
|
|
||||||
- test/report.py
|
- test/report.py
|
||||||
- kill -9 ${API_DAEMON_PID} || true
|
- kill -9 ${API_DAEMON_PID} || true
|
||||||
- /usr/sbin/postmulti -i - -p stop
|
- /usr/sbin/postmulti -i - -p stop
|
||||||
|
|
|
@ -127,6 +127,16 @@ if msg2['Precedence'] != 'list':
|
||||||
print(f'Expected "Precedence: list", got {msg2["Precedence"]}')
|
print(f'Expected "Precedence: list", got {msg2["Precedence"]}')
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
gpg1 = subprocess.Popen(['/usr/bin/gpg2', '-d'],
|
||||||
|
stdin=msg1.get_payload()[1].get_payload(decode=True),
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
gpg1o, _ = gpg2.communicate()
|
||||||
|
print(f'Key conflict message (decrypted):\n{gpg1o}')
|
||||||
|
gpg2 = subprocess.Popen(['/usr/bin/gpg2', '-d'],
|
||||||
|
stdin=msg2.get_payload()[1].get_payload(decode=True),
|
||||||
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
gpg1o, _ = gpg2.communicate()
|
||||||
|
print(f'Admin report message (decrypted):\n{gpg2o}')
|
||||||
|
|
||||||
# Test conflict statefile
|
# Test conflict statefile
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue