Commit bbb7560
committed
Merge #26: test: Add
f1db39a ci: Run `test_rpc_client` integration tests (valued mammal)
ee52af4 test: Improve unit, integration tests (valued mammal)
d77416c error: Unimplement `Error::source` (valued mammal)
Pull request description:
### Description
This is a follow up to #5 that introduces a `TestEnv` struct used for integration tests and fixes a number of nitpicks that were previously left out.
Summary:
- Add simple `TestEnv` struct with convenient interface for improved ergonomics
- Avoid manually implementing RPC calls (e.g. `generate_to_address`)
- Move auth tests to `client::test_auth` module
- Ignore (or remove) test using potentially insecure `std::env::tempdir`
- Don't call `node.stop()`, as this is handled by the `Drop` implementation of `Node`
- Add missing tests for existing RPC methods `get_block_verbose`, `get_block_header_verbose`
- Don't print to stdout
- Have more effective test assertions. For example it's sufficient to check that the RPC method returns the expected type. Keep some basic "sanity check" assertions, but try to avoid testing functionality that is defined outside of this library (e.g. the length of a `BlockHash`, and Bitcoin Core itself).
### Checklists
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [x] I ran `cargo fmt` and `cargo clippy` before committing
ACKs for top commit:
ValuedMammal:
self-ACK f1db39a
Tree-SHA512: 3634e0e00ed910b979eb998ad13b6a786f827a679495a12237c543a9a8e291eb04602cf0105753fa56dc542cdb57471d87bf630b8afee3bd1564d558cb1b016btestenv module7 files changed
Lines changed: 197 additions & 224 deletions
File tree
- .github/workflows
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
| |||
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
302 | 313 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 70 | + | |
86 | 71 | | |
87 | 72 | | |
88 | 73 | | |
| |||
0 commit comments