Write a script to perform E2E test #43

Closed
opened 2021-11-06 10:30:43 +01:00 by pfm · 3 comments
Collaborator

Provide a script that would

  1. set up necessary configuration;
  2. spawn our test relay (that would listen for incoming mail);
  3. feed gpg-mailgate.py with test data (test identity + test message);
  4. verify that test relay received the expected message.
Provide a script that would 1. set up necessary configuration; 2. spawn our test relay (that would listen for incoming mail); 3. feed gpg-mailgate.py with test data (test identity + test message); 4. verify that test relay received the expected message.
pfm added the
TESTS
label 2021-11-06 10:30:43 +01:00
pfm added a new dependency 2021-11-06 10:31:01 +01:00
pfm self-assigned this 2021-11-06 10:31:16 +01:00
Author
Collaborator

Open point: is os.chroot enough to simulate /etc/gpg-mailgate.conf presence without writing to system-wide directories?

Open point: is `os.chroot` enough to simulate `/etc/gpg-mailgate.conf` presence without writing to system-wide directories?
pfm added this to the Python3 rewrite milestone 2021-11-06 10:39:25 +01:00
Author
Collaborator

With a tiny adjustment to the original gpg-mailgate.py script it is possible to test the script without a global configuration file in /etc directory.

Python's 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.

With a tiny adjustment to the original `gpg-mailgate.py` script it is possible to test the script without a global configuration file in `/etc` directory. Python's `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.
Author
Collaborator

Test script has been implemented within #39.

Test script has been implemented within #39.
pfm closed this issue 2022-01-06 16:43:12 +01:00
Sign in to join this conversation.
No description provided.