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:
yyforyongyu
2023-03-08 02:50:33 +08:00
parent e46c689bf1
commit 10052ff4f5
2 changed files with 1156 additions and 24 deletions

File diff suppressed because it is too large Load Diff