-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Description
Summary
Enable Jest integration tests to run against a real Greenlight test network by reusing the existing Python test infrastructure (pyln.testing + gl-testing).
Motivation
The Python test suite already handles spinning up full ephemeral networks — bitcoind, the Greenlight scheduler, CLN nodes, GL nodes, and an LSP — via pyln and gl-testing. The gl-sdk-napi currently has no equivalent, making true end-to-end and integration testing impossible from the JS/TS side. Reimplementing this orchestration in TypeScript would duplicate complex, already-proven logic.
Proposed Solution
- Add a thin
setup_network.pyscript, invoked by JestglobalSetup, that:- Starts a full Greenlight test network using existing
pyln.testingandgl-testingfixtures - Registers GL nodes with the scheduler and starts their signer threads
- Writes a JSON config file with all connection info (
GL_*env vars, endpoints, cert paths, node IDs) - Keeps all processes alive for the duration of the Jest run
- Use
globalTeardownto cleanly stop all processes once the test suite finishes.
- Starts a full Greenlight test network using existing
Acceptance Criteria
- Network includes bitcoind, scheduler, 2 CLN nodes, 2 GL nodes, and 1 LSP Server
- GL nodes are registered with the scheduler and operational (signer threads running)
- Jest tests consume the generated JSON config and pass
-
globalTeardowncleanly shuts down all processes - Documentation updated if needed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels