Skip to content

Integration tests - #17

Merged
Kixunil merged 3 commits into
Kixunil:masterfrom
RCasatta:integration
Sep 10, 2021
Merged

Kixunil merged 3 commits into
Kixunil:masterfrom
RCasatta:integration

Conversation

@RCasatta

@RCasatta RCasatta commented Aug 4, 2021 •

Copy link
Copy Markdown
Collaborator

On top of #13 see only cf81501

Adds an integration test using bitcoind regtest as backend for payjoin receiver and sender using the implementation provided by the lib itself (the receiver part isn't finished since the library hasn't that part yet)

Note it uses my crate bitcoind which is a helper to spawn bitcoind processes

@RCasatta RCasatta mentioned this pull request Aug 4, 2021
@Kixunil

Kixunil commented Aug 4, 2021

Copy link
Copy Markdown
Owner

Yeah, I was thinking about something like that. I wonder if we can get rid of needing bitcoind for internal test to make it faster. I think it should be possible (using bitcoin crate only).

I also intend to make end-to-end test using lnpbp-testkit and multiple nodes (that part is not yet supportd in the testkit but planned)

@RCasatta

RCasatta commented Aug 4, 2021

Copy link
Copy Markdown
Collaborator Author

Not sure to follow you, you don't want bitcoind for faster tests but do you want to make end-to-end test using lnpbp-testkit and multiple nodes?

Anyway, at the moment the integration test takes 5 seconds, consider also that every other integration test could run in parallel spawning its own node.
If it's considered too much, we can have a specific feature to run tests requiring spawning other processes (like btcpay, bitcoind, lnd, c-lightning or others).
I would probably rather not have a specific feature at the moment, when developing you can easily filter and launch only a specific test or specific test module.

@Kixunil

Kixunil commented Aug 4, 2021

Copy link
Copy Markdown
Owner

My thinking is to run end-to-end tests less often (e.g. in CI but not locally during development).

the integration test takes 5 seconds

Wow, that's impressive! I thought it'd take much longer to download bitcoind binary, launch it, compile the code and do all other stuff. What kind of black magic is that?

I would probably rather not have a specific feature at the moment

Yep, that's fine.

@RCasatta

RCasatta commented Aug 4, 2021

Copy link
Copy Markdown
Collaborator Author

Wow, that's impressive! I thought it'd take much longer to download bitcoind binary, launch it, compile the code and do all other stuff. What kind of black magic is that?

I am not considering compile time and referring to the second launch, the binary is cached in cargo home and not downloaded again if present

@RCasatta
RCasatta marked this pull request as ready for review September 1, 2021 14:09
@RCasatta

RCasatta commented Sep 1, 2021

Copy link
Copy Markdown
Collaborator Author

I am not sure about 5071737, I did it because it looks bitcoind MSRV is greater than 1.41.1, I will check there if it's feasible to have bitcoind running with 1.41.1 so we don't need 5071737

@RCasatta

RCasatta commented Sep 2, 2021

Copy link
Copy Markdown
Collaborator Author

I am not sure about 5071737, I did it because it looks bitcoind MSRV is greater than 1.41.1, I will check there if it's feasible to have bitcoind running with 1.41.1 so we don't need 5071737

yes, i reduced bitcoind MSRV with rust-bitcoin/bitcoind#25, will revisit this one once I release bitcoind

@RCasatta
RCasatta marked this pull request as draft September 3, 2021 09:01
@RCasatta
RCasatta marked this pull request as ready for review September 10, 2021 08:45

@Kixunil Kixunil left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I will need to take time to learn implications of using core-rpc before merging.

Comment thread payjoin-client/Cargo.toml Resolved
@Kixunil
Kixunil merged commit 047f87b into Kixunil:master Sep 10, 2021
DanGould referenced this pull request in DanGould/rust-payjoin Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants