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
+2 -2
View File
@@ -111,7 +111,7 @@ impl<T: Trait> Module<T> {
);
assert!(
Self::now().is_zero() || now >= Self::now() + Self::block_period(),
"Timestamp but increment by at least <BlockPeriod> between sequential blocks"
"Timestamp must increment by at least <BlockPeriod> between sequential blocks"
);
<Self as Store>::Now::put(now);
<Self as Store>::DidUpdate::put(true);
@@ -228,7 +228,7 @@ mod tests {
}
#[test]
#[should_panic(expected = "Timestamp but increment by at least <BlockPeriod> between sequential blocks")]
#[should_panic(expected = "Timestamp must increment by at least <BlockPeriod> between sequential blocks")]
fn block_period_is_enforced() {
let mut t = system::GenesisConfig::<Test>::default().build_storage().unwrap();
t.extend(GenesisConfig::<Test> { period: 5 }.build_storage().unwrap());