Update documentation to cover daemon tests
This commit is contained in:
parent
414f1d5921
commit
1edef79787
|
@ -8,27 +8,31 @@ feed some input to GPG Mailgate and inspect the output.
|
||||||
|
|
||||||
To run tests, use command `make test`.
|
To run tests, use command `make test`.
|
||||||
|
|
||||||
There are 3 types of tests:
|
There are 4 types of tests:
|
||||||
|
|
||||||
* `make e2etest` -- they cover a complete Lacre flow, from feeding it with
|
* `make e2etest` -- they cover a complete Lacre flow, from feeding it with
|
||||||
an email to accepting its encrypted form;
|
an email to accepting its encrypted form;
|
||||||
|
* `make daemontest` -- similar to the original `e2etest` goal, but tests the
|
||||||
|
behaviour of the Lacre Daemon, i.e. key part of the Advanced Content
|
||||||
|
Filter.
|
||||||
* `make unittest` -- just small tests of small units of code;
|
* `make unittest` -- just small tests of small units of code;
|
||||||
* `make crontest` -- execute cron job with a SQLite database.
|
* `make crontest` -- execute cron job with a SQLite database.
|
||||||
|
|
||||||
E2E tests (`make e2etest`) should produce some helpful logs, so inspect
|
E2E tests (`make e2etest`) should produce some helpful logs, so inspect
|
||||||
contents of `test/logs` directory if something goes wrong.
|
contents of `test/logs` directory if something goes wrong.
|
||||||
|
|
||||||
If your system's Python binary isn't found in your `$PATH` or you want to use
|
If your system's Python binary isn't found in your `$PATH` or you want to use
|
||||||
a specific binary, use make's macro overriding: `make test
|
a specific binary, use make's macro overriding: `make test
|
||||||
PYTHON=/path/to/python`.
|
PYTHON=/path/to/python`.
|
||||||
|
|
||||||
## Key building blocks
|
## Key building blocks
|
||||||
|
|
||||||
- *Test Script* (`test/e2e_test.py`) that orchestrates the other components.
|
- *Test Script* (`test/e2e_test.py`) and *Daemon Test Script*
|
||||||
It performs test cases described in the *Test Configuration*. It spawns
|
(`test/daemon_test.py`) that orchestrate the other components. They perform
|
||||||
*Test Mail Relay* and *GPG Mailgate* in appropriate order.
|
test cases described in the *Test Configuration*. They spawn *Test Mail
|
||||||
- *Test Mail Relay* (`test/relay.py`), a simplistic mail daemon that only
|
Relay* and *GPG Mailgate* in appropriate order.
|
||||||
supports the happy path. It accepts a mail message and prints it to
|
- *Test Mail Relay* (`test/relay.py`), a simplistic mail daemon that only
|
||||||
|
supports the happy path. It accepts a mail message and prints it to
|
||||||
stdandard output.
|
stdandard output.
|
||||||
- *Test Configuration* (`test/e2e.ini`) specifies test cases: their input,
|
- *Test Configuration* (`test/e2e.ini`) specifies test cases: their input,
|
||||||
expected results and helpful documentation. It also specifies the port that
|
expected results and helpful documentation. It also specifies the port that
|
||||||
|
@ -38,7 +42,7 @@ PYTHON=/path/to/python`.
|
||||||
|
|
||||||
Currently tests only check if the message has been encrypted, without
|
Currently tests only check if the message has been encrypted, without
|
||||||
verifying that the correct key has been used. That's because we don't know
|
verifying that the correct key has been used. That's because we don't know
|
||||||
(yet) how to have a reproducible encrypted message. Option
|
(yet) how to have a reproducible encrypted message. Option
|
||||||
`--faked-system-time` wasn't enough to produce identical output.
|
`--faked-system-time` wasn't enough to produce identical output.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
Loading…
Reference in New Issue