Refactor service tests in sc-network (#12517)

* Refactor service tests in `sc-network`

Create a separate directory for the tests and move common network
instantion related code to `mod.rs` from where it can be used by both
service and chainsync tests.

Use the builder pattern when creating the `TestNetwork` object to reduce
code duplication between the test files.

* Update client/network/src/service/tests/mod.rs

Co-authored-by: Dmitrii Markin <dmitry@markin.tech>

Co-authored-by: Dmitrii Markin <dmitry@markin.tech>
Co-authored-by: parity-processbot <>
This commit is contained in:
Aaro Altonen
2022-10-21 09:39:23 +03:00
committed by GitHub
parent 48a02bb056
commit 7f8aab84b1
4 changed files with 499 additions and 514 deletions
-2
View File
@@ -94,8 +94,6 @@ use std::{
pub use behaviour::{InboundFailure, OutboundFailure, ResponseFailure};
#[cfg(test)]
mod chainsync_tests;
mod metrics;
mod out_events;
#[cfg(test)]