Write a script to perform E2E test
Provide a script that would
- set up necessary configuration;
- spawn our test relay (that would listen for incoming mail);
- feed gpg-mailgate.py with test data (test identity + test message);
- verify that test relay received the expected message.
Open point: is
os.chroot enough to simulate
/etc/gpg-mailgate.conf presence without writing to system-wide directories?
With a tiny adjustment to the original
gpg-mailgate.py script it is possible to test the script without a global configuration file in
os.getenv function takes second argument to pass the default value returned when an environment variable is missing, so we'll just try retrieving value of
$GPG_MAILGATE_CONFIG and use the file in
/etc in case variable is missing.
Deleting a branch is permanent. It CANNOT be undone. Continue?