Integration tests (#805)

* Started substrate tests

* Sync test

* Test updates

* Improved tests

* Use on-chain block delay

* Parallel test execution

* Otimized tests

* Logging

* Fixed racing test

* Fixed compilation

* Fixed timestamp test

* Removed rlp dependency

* Minor fixes

* Fixed tests

* Removed best_block_id and resolved fdlimit issue

* Whitespace

* Use keyring

* Style

* Added API execution setting

* Removed stale import
This commit is contained in:
Arkadiy Paronyan
2018-09-28 11:37:55 +02:00
committed by Gav Wood
parent 955a5393d8
commit 9a660f82ed
30 changed files with 590 additions and 140 deletions
+4
View File
@@ -203,6 +203,10 @@ subcommands:
- execution:
long: execution
value_name: STRATEGY
help: The means of execution used when executing blocks. Can be either wasm, native or both.
- api-execution:
long: api-execution
value_name: STRATEGY
help: The means of execution used when calling into the runtime. Can be either wasm, native or both.
- max-heap-pages:
long: max-heap-pages
+15 -6
View File
@@ -261,18 +261,18 @@ where
let role =
if matches.is_present("light") {
config.execution_strategy = service::ExecutionStrategy::NativeWhenPossible;
config.block_execution_strategy = service::ExecutionStrategy::NativeWhenPossible;
service::Roles::LIGHT
} else if matches.is_present("validator") || matches.is_present("dev") {
config.execution_strategy = service::ExecutionStrategy::Both;
config.block_execution_strategy = service::ExecutionStrategy::Both;
service::Roles::AUTHORITY
} else {
config.execution_strategy = service::ExecutionStrategy::NativeWhenPossible;
config.block_execution_strategy = service::ExecutionStrategy::NativeWhenPossible;
service::Roles::FULL
};
if let Some(s) = matches.value_of("execution") {
config.execution_strategy = match s {
config.block_execution_strategy = match s {
"both" => service::ExecutionStrategy::Both,
"native" => service::ExecutionStrategy::NativeWhenPossible,
"wasm" => service::ExecutionStrategy::AlwaysWasm,
@@ -400,11 +400,20 @@ fn import_blocks<F, E>(matches: &clap::ArgMatches, spec: ChainSpec<FactoryGenesi
config.database_path = db_path(&base_path, config.chain_spec.id()).to_string_lossy().into();
if let Some(s) = matches.value_of("execution") {
config.execution_strategy = match s {
config.block_execution_strategy = match s {
"both" => service::ExecutionStrategy::Both,
"native" => service::ExecutionStrategy::NativeWhenPossible,
"wasm" => service::ExecutionStrategy::AlwaysWasm,
_ => return Err(error::ErrorKind::Input("Invalid execution mode specified".to_owned()).into()),
_ => return Err(error::ErrorKind::Input("Invalid block execution mode specified".to_owned()).into()),
};
}
if let Some(s) = matches.value_of("api-execution") {
config.api_execution_strategy = match s {
"both" => service::ExecutionStrategy::Both,
"native" => service::ExecutionStrategy::NativeWhenPossible,
"wasm" => service::ExecutionStrategy::AlwaysWasm,
_ => return Err(error::ErrorKind::Input("Invalid API execution mode specified".to_owned()).into()),
};
}