Write a script to perform E2E test #43

Closed
opened 9 months ago by pfm · 3 comments
pfm commented 9 months ago
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 9 months ago
pfm added a new dependency 9 months ago
pfm self-assigned this 9 months ago
Poster
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 9 months ago
Poster
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.
Poster
Collaborator

Test script has been implemented within #39.

Test script has been implemented within #39.
pfm closed this issue 7 months ago
Sign in to join this conversation.
Loading…
There is no content yet.