mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-19 20:25:51 +01:00
routing: patch unit tests for payment lifecycle
This commit adds unit tests for `resumePayment`. In addition, the `resumePayment` has been split into two parts so it's easier to be tested, 1) sending the htlc, and 2) collecting results. As seen in the new tests, this split largely reduces the complexity involved and makes the unit test flow sequential. This commit also makes full use of `mock.Mock` in the unit tests to provide a more clear testing flow.
This commit is contained in: