Skip to content
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

Expose a _test_utils feature to expose integration test helpers #422

Open
DanGould opened this issue Dec 2, 2024 · 1 comment
Open

Expose a _test_utils feature to expose integration test helpers #422

DanGould opened this issue Dec 2, 2024 · 1 comment

Comments

@DanGould
Copy link
Contributor

DanGould commented Dec 2, 2024

Higher layer payjoin implementations like payjoin-ffi and payjoin-flutter and the bindings they produce would make use of a _test_utils feature like rust-lightning has. The _ prefix prevents it from being a listed feature in documentation by default.

This should expose:

  • BitcoinD and wallet setup
  • payjoin-directory setup and teardown, including ephemeral Redis containers
  • ohttp-relay setup and teardown

Then, the higher level crates can create bindings to make these available in all languages we bind to for easy test duplication downstream.

@spacebear21
Copy link
Collaborator

To do this more cleanly, i guess would suggest introducing some kind of TestServices struct, make init_directory into something that constructs that (combining with relay initialization i suppose), and endow it with informational getters for e.g. the port/host numbers, as well as the owner of the Container/docker CLI structs that need to remain alive?

#421 should probably be addressed as part of such cleanup as well

Originally posted by @nothingmuch in #388 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants