Files
logos-messaging-nim/tests-e2e/README.md
T
Egor Rachkovskii 23b0d31e84 test(e2e): port the channel delivery tests and the isolated sender process (#4117)
Three open PRs in logos-delivery-interop-tests add 19 channel-API tests
(RC07-RC09 #203, RC10-RC12 #209, RC13 #212). Their wrapper API surface is
already covered here, but the pieces they import were not, so those tests could
not be written in core. This ports them.

subprocess_node.py, rc05/rc06 and the closed-channel test come from interop
master; the two wrapper_helpers additions are byte-identical to what #209/#212
add, so the RC07-RC13 ports apply cleanly.

Why a spawned subprocess: co-located nodes both default localStoragePath to
./data and share data/sds.db, so the receiver drops the sender's own channel
message as a duplicate. The interop rationale blaming a process-wide Persistency
singleton is false since #4109 made Persistency per-node; the shared storage path
is the cause, and chdir to a private temp dir is what isolates it. A per-node
localStoragePath would likely replace the spawn machinery, but RC07-RC13 build on
the ported form.

Why the re-subscribe in the closed-channel test: channel_close unsubscribes the
content topic and subscriptions are not refcounted (#4081, tracked in #4087), so
the receiver re-subscribes to keep message_received as the arrival witness. This
follows the resolution in the still-open interop PR #212.

Non-docker collection goes 48 -> 51; README updated. Suite: 48 passed, 2 skipped,
1 xfailed, verified over two back-to-back runs.
2026-08-12 19:03:09 +01:00

33 lines
1.3 KiB
Markdown

# tests-e2e — logos-delivery API/e2e tests (Python)
End-to-end tests for `liblogosdelivery`, driven through the Python bindings (C-FFI).
Migrated from [`logos-delivery-interop-tests`](https://github.com/logos-messaging/logos-delivery-interop-tests) (the wrapper / send-API suite).
## Layout
- `src/` — test framework (node wrappers, steps, helpers)
- `tests/wrappers_tests/` — the API/e2e scenario tests (`test_s02…s31`)
- `vendor/logos-delivery-python-bindings/waku/wrapper.py` — CFFI binding (`NodeWrapper`); it `dlopen`s `../lib/liblogosdelivery.so`
## Run locally
```bash
# 1. Build the shared library and place it where the binding looks for it
./tests-e2e/scripts/prepare_lib.sh
# 2. Python env + deps
python -m venv .venv && source .venv/bin/activate
pip install -r tests-e2e/requirements.txt
# 3. Run (from tests-e2e/)
cd tests-e2e
pytest tests/wrappers_tests -m "not docker_required" # 51 pure-binding tests
pytest tests/wrappers_tests -m docker_required # 5 tests that also need a Docker nwaku peer (S11/S19/S20/S25/S31)
```
## CI
`.github/workflows/e2e-api-tests.yml` (called from `ci.yml`, `needs: build`) downloads the
`liblogosdelivery` artifact produced by the `build` job and runs the non-docker subset on every PR —
so a protocol change and its e2e test land in the same PR.