-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# SV2 Integration Tests | ||
|
||
This is a test crate and it can be used in order to test the behavior of different roles when | ||
working together. Each role should have a `start_[role_name]` function under `common` folder that | ||
can be called in order to run the role. In order to assert the behavior of the role or the messages | ||
it exchanges with other roles, you can use the `Sniffer` helper in order to listen to the messages | ||
exchanged between the roles, and assert those messages using the `assert_message_[message_type]` | ||
function. For examples on how to use the `Sniffer` helper, you can check the | ||
`sniffer_integration.rs` module or other tests in the `tests` folder. | ||
|
||
All of our tests run in regtest network. We download the Template Provider node from | ||
https://github.com/Sjors/bitcoin/releases/download. This is a pre-built binary that we use to run an | ||
Stratum V2 compatible bitcoin node. Note that this is the only external dependency(and Role) that we | ||
have in our tests. | ||
|
||
## Running Instructions | ||
|
||
In order to run the integration tests, you can use the following command: | ||
|
||
```bash | ||
$ git clone [email protected]:stratum-mining/stratum.git | ||
$ cargo test --manifest-path=roles/Cargo.toml --verbose --test '*' -- --nocapture | ||
``` | ||
|
||
## License | ||
MIT OR Apache-2.0 |