-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mint] Write test pipeline with LIGHTNING=True
#128
Comments
I've used this testing library VCR a lot before, it's great for testing things that need to make requests where it's a pain to set up all the things you need to make requests to, or where responses can change over time making tests non-deterministic (e.g. secrets are ephemeral, tokens are invalid once spent, etc.). It stores fixtures for responses and intercepts/monkey-patches the requesting library (works with requests, aiohttp, httpx, etc.) mocking the fixture in. Also useful for catching regressions and unintended behaviour changes too |
Maybe @xphade would be interested in this issue. Emulating Lightning with FakeWallet should work well by now! |
Yes! I was pretty low on time the last couple of weeks but I would definitely like to work on the tests a bit next. So this would be something I can look into. |
Here's a branch with cashu using python 3.10 and a cashu friendly version of lnbits as dependency. https://github.com/dyKiU/cashu/tree/fake-lnbits-test This is to avoid to a circular dependency of cashu -> lnbits -> old cashu |
So close to cashu tests with lighting via lnbits, until the main branch hit us with deps update. Now trying to get lnbits to use pydandic v2. This is challenging! Brain needs help https://github.com/dyKiU/cashu/tree/topic/tests_with_ln_brrr |
i want lnbits with pydantic v2 aswell :) first needs lnurl lib to use it though, and i am struggling to make it happen here. lnbits/lnurl#21 |
Thanks @dni, your repos made me think about a way around lnbits as a dependency using docker compose, but we actually need some of the lnbits python in the tests. The maintanance and package updates for cashu will be quite challenging with lnbits in tow. |
i would rather use the lib directly #297 like here with the bolt11 lib |
All tests right now use LIGHTNING=False (a lot easier to test things) but it would be great if some also test Lightning functions. We would have to set up an LNbits instance in the tests (with FakeWallet, i.e. not using the real Lightning network).
The text was updated successfully, but these errors were encountered: