lndk-org / lndk

MIT License
85 stars 22 forks source link

Task: integration tests for making payments to Eclair/CLN offers #157

Open orbitalturtle opened 2 months ago

orbitalturtle commented 2 months ago

Description

Integration tests for making payments to Eclair and CLN offers. This will help us to ensure that new changes don't mess up payments.

Steps to Complete

  1. Decide how to build and run Eclair for out integration tests. Currently we build LND in the Makefile and run it directly in Rust: https://github.com/lndk-org/lndk/blob/83e1c90dbef2749272c258ac2e2f3d04eb2f32f6/tests/common/mod.rs#L357. But maybe a better option would be to use Docker (similar to ldk-node: https://github.com/lightningdevkit/ldk-node/blob/main/docker-compose-cln.yml cc: @tnull) to spin up the nodes to help ensure that the tests can run on all platforms.
  2. With this as a backbone, write up some integration tests showing that we can make a payment to an offer created by an Eclair node. The integration tests are located here: https://github.com/lndk-org/lndk/tree/master/tests
  3. Repeat the above steps for CLN. (This could go in a separate PR if it's a decent amount of code.)

Notes

For Eclair: Note that in addition to running the Eclair node, the tipjar plugin needs to be enabled. The instructions can be found here: https://github.com/lndk-org/lndk/blob/master/docs/test_pay_offer.md

For CLN, make sure to use v24.08 (it should be released soon, though the master branch can potentially be used for now). Payments don't work to prior versions of CLN.