Commit graph

21 commits

Author SHA1 Message Date
ce595971e1
Document key lifecycle 2024-08-23 14:16:27 +02:00
276e0d0cd4 Use one config for cron and daemon tests 2024-01-07 21:52:52 +01:00
a943b50adb Update test configuration after renaming 2024-01-06 15:06:36 +01:00
a98ff611ee Continue renaming: config files, tests, docs 2024-01-06 14:45:09 +01:00
90da933bf9 Make disconnect handling configuration explicit
- Provide a new reuqired parameter: [database]pooling_mode and use it during
  SQLAlchemy engine initialisation.

- Update tests and configuration (including sample configuration).

- Adjust repository unit test to load config during setup.

- Pass an engine instance to repository constructors instead of connections.
  Engine keeps a connection pool and we rely on it.
2023-12-17 14:03:20 +01:00
9b5c43b769 Fix crontest config, polish Makefile 2023-11-25 15:05:27 +01:00
274bfbaf3b Always use 'python' binary during tests 2023-09-30 22:33:49 +02:00
fe49d985ec Adjust cron tests after recent FE decoupling 2022-10-19 20:54:40 +02:00
c41df63e42 Reorder tests to avoid interferences 2022-10-19 18:36:23 +00:00
414f1d5921 Implement E2E tests for lacre.daemon
- Add a dedicated configuration file for lacre.daemon.

- Implement test/daemon_test.py like test/e2e_test.py, to automate the
following procedure:

    1. Start up lacre.daemon.
    2. For each test case, send test message to the daemon and verify that the
       output received by test/utils/relay.py contains expected pattern.

- Simplify Makefile.

- Fix indentation here and there.
2022-10-19 18:36:23 +00:00
a131cd66d3 Move different parts of Lacre tests to subdirectories
In particular, move:

- test utilities to test/utils;
- unit tests to test/modules.

Also: start implementing the Lacre daemon test (just a stub for now).
2022-10-19 18:36:23 +00:00
4c844384e3 Implement a bare minimum of advanced filtering
- Forward messages without encryption.

- Include a simple test setup in the Makefile.

- Add a test to send a test message to the daemon.
2022-10-19 18:36:23 +00:00
8f191cae72 Restore keyring before running E2E tests 2022-10-19 18:36:23 +00:00
ffc53b935a Finish migration to SQLAlchemy and automate testing cron.py 2022-04-23 13:08:40 +02:00
c81c6e6e0d Remove hardcoded python3.8 path
- Let the user overwrite Python binary name while calling make.

- Use environment variable set by make to instruct e2e_test.py which binary it
should call to execute Python code.
2022-01-10 20:22:17 +01:00
24f0c86d4f Tidy up tests
- Makefile: add 'unittest' to .PHONY targets.
- Remove unnecessary #! line from e2e_test.py.
- Extract Python path to test/e2e.ini file.
2022-01-10 18:39:29 +01:00
b2a01c15b0 Fix auto-migrated code
- Use b'' (byte strings) where appropriate.

- Fix indentation.

- Replace python2.x references with python3.x.
2022-01-10 18:21:40 +01:00
2cf60dec40 Add unit tests for GnuPG command-line generator
Extract a function to calculate GPG commands to be executed and cover it with
unit tests.
2022-01-09 21:37:14 +01:00
f1a799d864 Adjust E2E tests to work with all scenarios
Since it's not so easy to encrypt a message exactly the same way twice, we
only verify if the message has been encrypted or not.

Introduce minor changes to the library itself, because it doesn't work very
well with modern GnuPG.

Also, include GnuPG directory (pointed at by --homedir option).
2022-01-06 16:34:47 +01:00
27d7481078 Set up ground for E2E tests
- Use an environment variable to point at the configuration file while
  strating gpg-mailgate.py.

- Unify paths: store temporary config, logs and anything else under 'test'
  directory.

- Configure more tests (RSA, Ed25519).

- Add test descriptions to be shown before they're started.
2022-01-06 16:33:21 +01:00
7a063a91b8 Polish E2E testing script and make it configurable 2021-11-09 21:25:41 +01:00