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

Move integration tests to their own directory #26

Open
chris-belcher opened this issue Jul 24, 2021 · 4 comments
Open

Move integration tests to their own directory #26

chris-belcher opened this issue Jul 24, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@chris-belcher
Copy link
Contributor

While reading the rust book again, I realized that it recommends that integration test be put in their own directory, rather than the status quo where they are in main.rs

https://doc.rust-lang.org/book/ch11-03-test-organization.html#integration-tests

@chris-belcher chris-belcher added the enhancement New feature or request label Jul 24, 2021
@chris-belcher
Copy link
Contributor Author

Eventually we'll get many many more integration tests, for all the possible branches. For example the case where a taker sends money into a coinswap address but the maker becomes unresponsive, forcing the taker to broadcast its own contract transaction and wait for the timeout to get its money back.

@mojoX911
Copy link
Contributor

+1. It makes sense to put integration tests into their own module.

Also do you think https://github.com/RCasatta/bitcoind crate will be helpful in spawning bitcoind programatically?

This helps in creating multiple bitcoind backend and connect them together and create our own regtest network. I am not sure if it will be super helpful in our test scenarios. But if we need to have multiple core nodes into the test environment, that might come handy.

@chris-belcher
Copy link
Contributor Author

Multiple bitcoind instances connected together are not that useful for us. If needed it's possible to simulate blockchain reorgs using invalidateblock and reconsiderblock.

@mojoX911
Copy link
Contributor

mojoX911 commented Aug 1, 2021

Ya that makes sense. We will not need to test in p2p network level stuffs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants