Skip to content

Unify the style in integration tests. #348

@jamillambert

Description

@jamillambert

The tests for the RPCs have been written over a period of time by different people and there are differences in the way the same thing is done in different sections. This makes looking through the tests more difficult and increases the risk of subtle mistakes like silently ignoring an empty RPC return.

Some examples that can easily be addressed, preferred option in bold (Will be updated based on any valid comments):

  • let _ = model.unwrap(); vs all in previous line without explicit error typing: json.into_model().unwrap(); vs model.unwrap();
  • unwrap() w/o context. vs expect("getblocktemplate")
  • assert!(value == expected) vs assert_eq!(value, expected).
  • Feature gate placement.
  • Some tests lack any assertion verifying non-empty data.
  • Unused imports allowed globally vs narrowing scope.
  • Duplicate helpers.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions