-
Notifications
You must be signed in to change notification settings - Fork 39
Robustness: Improve Test Coverage of Repo #185
Copy link
Copy link
Open
Labels
Code HealthRefactors and improvements to the structure of the codeRefactors and improvements to the structure of the codeHigh PriorityRobustnessChanges that improve the robustness of running the simulatorChanges that improve the robustness of running the simulatorhelp wantedExtra attention is neededExtra attention is needed
Metadata
Metadata
Assignees
Labels
Code HealthRefactors and improvements to the structure of the codeRefactors and improvements to the structure of the codeHigh PriorityRobustnessChanges that improve the robustness of running the simulatorChanges that improve the robustness of running the simulatorhelp wantedExtra attention is neededExtra attention is needed
SimLN started as a hackathon project, so it doesn't have much by way of unit tests. This is very, very bad.
We should aim to dramatically improve the coverage of the codebase to ensure that everything is working as expected, and there are no future regressions.
A great first starting point would be to add test coverage for
Simulatorwith mock outLightningNodeimplementations. See sim node mocking as an example of how to go about this.Low hanging fruit:
validate_activityvalidate_node_networkMiddle tier:
Test individual functions for their expected behavior, eg:
consume_eventssend_paymentfailure,listenershutdown etcsend_paymentfor bothSimulationOutput::SendPaymentSuccess/SimulationOutput::SendPaymentFailureetcA few considerations here:
consume_eventsin a separate task so the test can runThe rest of the elephant:
Simulation::runfunction with mocked nodes