Use construct_runtime in tests (#8059)

* impl some more

* add serde

* remove unused

* fix staking fuzz

* fix system bench

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Guillaume Thiolliere
2021-02-06 21:12:46 +01:00
committed by GitHub
parent 4b1460f61f
commit 0ed683ca13
18 changed files with 446 additions and 445 deletions
+17 -17
View File
@@ -71,7 +71,7 @@ fn deposit_event_should_work() {
vec![
EventRecord {
phase: Phase::Finalization,
event: SysEvent::CodeUpdated,
event: SysEvent::CodeUpdated.into(),
topics: vec![],
}
]
@@ -99,17 +99,17 @@ fn deposit_event_should_work() {
vec![
EventRecord {
phase: Phase::Initialization,
event: SysEvent::NewAccount(32),
event: SysEvent::NewAccount(32).into(),
topics: vec![],
},
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: SysEvent::KilledAccount(42),
event: SysEvent::KilledAccount(42).into(),
topics: vec![]
},
EventRecord {
phase: Phase::ApplyExtrinsic(0),
event: SysEvent::ExtrinsicSuccess(Default::default()),
event: SysEvent::ExtrinsicSuccess(Default::default()).into(),
topics: vec![]
},
EventRecord {
@@ -117,12 +117,12 @@ fn deposit_event_should_work() {
event: SysEvent::ExtrinsicFailed(
DispatchError::BadOrigin.into(),
Default::default()
),
).into(),
topics: vec![]
},
EventRecord {
phase: Phase::Finalization,
event: SysEvent::NewAccount(3),
event: SysEvent::NewAccount(3).into(),
topics: vec![]
},
]
@@ -173,7 +173,7 @@ fn deposit_event_uses_actual_weight() {
weight: 300,
.. Default::default()
},
),
).into(),
topics: vec![]
},
EventRecord {
@@ -183,7 +183,7 @@ fn deposit_event_uses_actual_weight() {
weight: 1000,
.. Default::default()
},
),
).into(),
topics: vec![]
},
EventRecord {
@@ -193,7 +193,7 @@ fn deposit_event_uses_actual_weight() {
weight: 1000,
.. Default::default()
},
),
).into(),
topics: vec![]
},
EventRecord {
@@ -204,7 +204,7 @@ fn deposit_event_uses_actual_weight() {
weight: 999,
.. Default::default()
},
),
).into(),
topics: vec![]
},
]
@@ -232,9 +232,9 @@ fn deposit_event_topics() {
];
// We deposit a few events with different sets of topics.
System::deposit_event_indexed(&topics[0..3], SysEvent::NewAccount(1));
System::deposit_event_indexed(&topics[0..1], SysEvent::NewAccount(2));
System::deposit_event_indexed(&topics[1..2], SysEvent::NewAccount(3));
System::deposit_event_indexed(&topics[0..3], SysEvent::NewAccount(1).into());
System::deposit_event_indexed(&topics[0..1], SysEvent::NewAccount(2).into());
System::deposit_event_indexed(&topics[1..2], SysEvent::NewAccount(3).into());
System::finalize();
@@ -244,17 +244,17 @@ fn deposit_event_topics() {
vec![
EventRecord {
phase: Phase::Finalization,
event: SysEvent::NewAccount(1),
event: SysEvent::NewAccount(1).into(),
topics: topics[0..3].to_vec(),
},
EventRecord {
phase: Phase::Finalization,
event: SysEvent::NewAccount(2),
event: SysEvent::NewAccount(2).into(),
topics: topics[0..1].to_vec(),
},
EventRecord {
phase: Phase::Finalization,
event: SysEvent::NewAccount(3),
event: SysEvent::NewAccount(3).into(),
topics: topics[1..2].to_vec(),
}
]
@@ -375,7 +375,7 @@ fn set_code_with_real_wasm_blob() {
System::events(),
vec![EventRecord {
phase: Phase::Initialization,
event: SysEvent::CodeUpdated,
event: SysEvent::CodeUpdated.into(),
topics: vec![],
}],
);