|
@@ -395,7 +395,7 @@ pub fn testnet_genesis(
|
|
|
#[cfg(test)]
|
|
|
pub(crate) mod tests {
|
|
|
use super::*;
|
|
|
- use crate::service::{new_full, new_light};
|
|
|
+ use crate::service::{new_full_base, new_light_base, NewFullBase};
|
|
|
use sc_service_test;
|
|
|
|
|
|
fn local_testnet_genesis_instant_single() -> GenesisConfig {
|
|
@@ -471,8 +471,30 @@ pub(crate) mod tests {
|
|
|
fn test_connectivity() {
|
|
|
sc_service_test::connectivity(
|
|
|
integration_test_config_with_two_authorities(),
|
|
|
- |config| new_full(config),
|
|
|
- |config| new_light(config),
|
|
|
+ |config| {
|
|
|
+ let NewFullBase {
|
|
|
+ task_manager,
|
|
|
+ client,
|
|
|
+ network,
|
|
|
+ transaction_pool,
|
|
|
+ ..
|
|
|
+ } = new_full_base(config, |_, _| ())?;
|
|
|
+ Ok(sc_service_test::TestNetComponents::new(
|
|
|
+ task_manager,
|
|
|
+ client,
|
|
|
+ network,
|
|
|
+ transaction_pool,
|
|
|
+ ))
|
|
|
+ },
|
|
|
+ |config| {
|
|
|
+ let (keep_alive, _, client, network, transaction_pool) = new_light_base(config)?;
|
|
|
+ Ok(sc_service_test::TestNetComponents::new(
|
|
|
+ keep_alive,
|
|
|
+ client,
|
|
|
+ network,
|
|
|
+ transaction_pool,
|
|
|
+ ))
|
|
|
+ },
|
|
|
);
|
|
|
}
|
|
|
}
|