Skip to content

Commit c231f37

Browse files
altonendmitry-markin
authored andcommitted
Improve test coverage of the Notifications protocol (paritytech#13033)
* Add handler and upgrade tests * Add tests for `behaviour.rs` * Apply review comments * Update dependencies * Apply suggestions from code review Co-authored-by: Dmitry Markin <[email protected]> * Apply review comments * Fix clippy * Update mockall * Apply review comment --------- Co-authored-by: Dmitry Markin <[email protected]>
1 parent ff5964e commit c231f37

File tree

9 files changed

+3773
-471
lines changed

9 files changed

+3773
-471
lines changed

Cargo.lock

Lines changed: 349 additions & 353 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/consensus/common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ futures = { version = "0.3.21", features = ["thread-pool"] }
1818
futures-timer = "3.0.1"
1919
libp2p = "0.50.0"
2020
log = "0.4.17"
21-
mockall = "0.11.2"
21+
mockall = "0.11.3"
2222
parking_lot = "0.12.1"
2323
serde = { version = "1.0", features = ["derive"] }
2424
thiserror = "1.0.30"

client/network/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ ip_network = "0.4.1"
2828
libp2p = { version = "0.50.0", features = ["dns", "identify", "kad", "macros", "mdns", "mplex", "noise", "ping", "tcp", "tokio", "yamux", "websocket"] }
2929
log = "0.4.17"
3030
lru = "0.8.1"
31+
mockall = "0.11.3"
3132
parking_lot = "0.12.1"
3233
pin-project = "1.0.12"
3334
rand = "0.8.5"
@@ -52,9 +53,12 @@ sp-runtime = { version = "7.0.0", path = "../../primitives/runtime" }
5253

5354
[dev-dependencies]
5455
assert_matches = "1.3"
56+
multistream-select = "0.12.1"
57+
rand = "0.8.5"
5558
tempfile = "3.1.0"
5659
tokio = { version = "1.22.0", features = ["macros"] }
5760
tokio-util = { version = "0.7.4", features = ["compat"] }
61+
tokio-test = "0.4.2"
5862
sc-network-light = { version = "0.10.0-dev", path = "./light" }
5963
sc-network-sync = { version = "0.10.0-dev", path = "./sync" }
6064
sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" }

0 commit comments

Comments
 (0)