Created an assert_status_code_eq! to extract the status_code of forced errors and then compare and panic if the expressions don't match. This was implemented to reduce the boilerplate of previously downcasting every error manually.
Details
Details
- Reviewers
Fabien - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) Restricted Project - Commits
- rABCe3e84199d89c: [chronik] Add assert_status_code_eq! macro to bitcoinsuite-chronik-client
Please set BUILD_DIR env to export BUILD_DIR="/path/to/build_dir
UNIX: ./contrib/teamcity/build-configurations.py build-bitcoinsuite-chronik-client
cargo test --nocapture
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- status_error
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 32705 Build 64898: Build Diff build-bitcoinsuite-chronik-client Build 64897: arc lint + arc unit
Event Timeline
modules/bitcoinsuite-chronik-client/tests/block_and_blocks.rs | ||
---|---|---|
124 ↗ | (On Diff #53043) | You can improve the api: assert_status_code(result, 400); |
modules/bitcoinsuite-chronik-client/tests/block_and_blocks.rs | ||
---|---|---|
124 ↗ | (On Diff #53043) |
assert_error_status_code is even better, because code 200 is no error and this code don't cover this case |
Comment Actions
Please update your title and summary
modules/bitcoinsuite-chronik-client/tests/test_chronik_client.rs | ||
---|---|---|
450 ↗ | (On Diff #53051) | You don't need to test the test fixtures, which in turns is a duplicata of the client block tests where it already gets coverage |