recover light client integration tests (#4377)

This commit is contained in:
Svyatoslav Nikolsky
2019-12-17 10:45:04 +03:00
committed by Bastian Köcher
parent 48860a768b
commit cd718cd77d
3 changed files with 8 additions and 32 deletions
+2 -8
View File
@@ -349,8 +349,7 @@ pub fn local_testnet_config() -> ChainSpec {
#[cfg(test)]
pub(crate) mod tests {
use super::*;
use crate::service::new_full;
use sc_service::Roles;
use crate::service::{new_full, new_light};
use sc_service_test;
fn local_testnet_genesis_instant_single() -> GenesisConfig {
@@ -398,12 +397,7 @@ pub(crate) mod tests {
sc_service_test::connectivity(
integration_test_config_with_two_authorities(),
|config| new_full(config),
|mut config| {
// light nodes are unsupported
config.roles = Roles::FULL;
new_full(config)
},
true,
|config| new_light(config),
);
}
}
+5 -17
View File
@@ -408,8 +408,8 @@ mod tests {
use sp_timestamp;
use sp_finality_tracker;
use sp_keyring::AccountKeyring;
use sc_service::{AbstractService, Roles};
use crate::service::new_full;
use sc_service::AbstractService;
use crate::service::{new_full, new_light};
use sp_runtime::traits::IdentifyAccount;
type AccountPublic = <Signature as Verify>::Signer;
@@ -470,11 +470,7 @@ mod tests {
sc_service_test::sync(
sc_chain_spec::integration_test_config(),
|config| new_full(config),
|mut config| {
// light nodes are unsupported
config.roles = Roles::FULL;
new_full(config)
},
|mut config| new_light(config),
block_factory,
extrinsic_factory,
);
@@ -510,11 +506,7 @@ mod tests {
setup_handles = Some((block_import.clone(), babe_link.clone()));
}).map(move |(node, x)| (node, (x, setup_handles.unwrap())))
},
|mut config| {
// light nodes are unsupported
config.roles = Roles::FULL;
new_full(config)
},
|config| new_light(config),
|service, &mut (ref inherent_data_providers, (ref mut block_import, ref babe_link))| {
let mut inherent_data = inherent_data_providers
.create_inherent_data()
@@ -638,11 +630,7 @@ mod tests {
sc_service_test::consensus(
crate::chain_spec::tests::integration_test_config_with_two_authorities(),
|config| new_full(config),
|mut config| {
// light nodes are unsupported
config.roles = Roles::FULL;
new_full(config)
},
|config| new_light(config),
vec![
"//Alice".into(),
"//Bob".into(),