RoboSats / robosats

A simple and private bitcoin exchange
https://learn.robosats.com
GNU Affero General Public License v3.0
707 stars 141 forks source link

reactivate CLN integration tests #1336

Closed daywalker90 closed 3 months ago

daywalker90 commented 3 months ago

Ontop of #1335

What does this PR do?

reactivate CLN integration tests

Checklist before merging

Issues

I managed to run these tests locally but encountered some issues:

Any pointers why this happens could help me figure out what's wrong.

daywalker90 commented 3 months ago

I actually could not reproduce the error with the correct down command. Anyways i added an entrypoint to generate a block.

daywalker90 commented 3 months ago

Everrything should be passing now: https://github.com/daywalker90/robosats/actions/runs/9542920360/job/26298571087

Reckless-Satoshi commented 3 months ago

Woop! :rocket: These tests passing makes me very confident we can now see mainnet robosats coordinators with CLN.

Thank you @daywalker90 !

Interesting that the coverage of the CLN class is somewhat low (well this is true too for LND I believe).

api/lightning/cln.py                                                                435    205    53%

Please post an invoice with a long expiration time (+1 week) for 300K Sats.

daywalker90 commented 3 months ago

Yes, i'd love to see one. I would do it myself but doing support kinda scares me off. LND has 54% btw. If i can get a quick grasp on how the testing framework works i might pump those numbers up, no promises tho.

Thanks for the sats :)

lnbc3m1pn8pv5esp5c5hz00telunev62zdqfm5m0js5eyta4wla08dp6f676zargujj6qpp5zsm89dp2wfhcm678a7nvlur4eg3jp5usf5la0qjd3p9q8zsgjcjqdqqxq9pycjqcqpjrzjqw5nhpalnuzjhr5x94g7hwkyee0f0d05zd6k8n239p2g6l6e0rw6jr9cgsqq0sgqqvqqqqryqqqqqqqq2q9qxpqysgq9959vfpauf4yc880k2tswxtutzcxke968qc4uxhrpa9wser2yee4ezgs423zf0rld2eeyn4tnpgkks5splns9dvl8vkwdndc2mfktpsp8d8w0d
Reckless-Satoshi commented 3 months ago

If i can get a quick grasp on how the testing framework works i might pump those numbers up, no promises tho.

The way I would go with it is to get the HTML report

docker exec coordinator coverage run manage.py test
docker exec coordinator coverage html

Take a look at the html output and then either:

  1. Write a unit test for those specific functions
  2. Better, create a trade order condition that will trigger those.

I guess a lot of what is not covered has to do with mostlt with logging the onchain and channel balances, etc. Those will benefit of simple unit testing :)

Reckless-Satoshi commented 3 months ago

lnbc3m1pn8pv5esp5c5hz00telunev62zdqfm5m0js5eyta4wla08dp6f676zargujj6qpp5zsm89dp2wfhcm678a7nvlur4eg3jp5usf5la0qjd3p9q8zsgjcjqdqqxq9pycjqcqpjrzjqw5nhpalnuzjhr5x94g7hwkyee0f0d05zd6k8n239p2g6l6e0rw6jr9cgsqq0sgqqvqqqqryqqqqqqqq2q9qxpqysgq9959vfpauf4yc880k2tswxtutzcxke968qc4uxhrpa9wser2yee4ezgs423zf0rld2eeyn4tnpgkks5splns9dvl8vkwdndc2mfktpsp8d8w0d

54d6ea8da3c43ee02331ac0a590c0dc37a3bc98aa8758ed006332db39c277660