Use pallet names to name enum variants (#8990)

* Remove unused event_metadata variable

* Eliminate mod_name and use pallet names to name enum variants

* Rename field name `pallet` to `path`

* Use only the pallet name to generate variant names

* Use new naming scheme for Event enum in sudo pallet tests

* Use new naming scheme for Event enum in offences pallet tests

* Use new naming scheme for Event enum in contracts pallet tests

* Use new naming scheme for Event enum in collective pallet tests

* Use new naming scheme for Event enum in bounties pallet tests

* Use new naming scheme for Event enum in balances pallet tests

* Use new naming scheme for Event enum in assets pallet tests

* Use new naming scheme for Event enum in frame support tests

* Use new naming scheme for Event enum in tips pallet tests

* Use new naming scheme for Event enum in transaction payment pallet tests

* Use new naming scheme for GenesisConfig fields in example pallet tests

* Use new naming scheme for GenesisConfig fields in elections pallet tests

* Use new naming scheme for Event enum in election provider multi-phase pallet tests

* Use new naming scheme for Event enum in elections phragmen pallet tests

* Use new naming scheme for GenesisConfig fields in chain spec

* Use new naming scheme for Event enum in staking pallet mock

* Use new naming scheme for GenesisConfig fields in node-template chain spec

* Use new naming scheme for GenesisConfig fields in node-testing chain spec

* Use new naming scheme for Event enum in node executor tests

* Use new naming scheme for GenesisConfig fields in transaction storage pallet mock

* Refactor match conditions
This commit is contained in:
Keith Yeung
2021-06-09 02:31:29 -07:00
committed by GitHub
parent ea6831e398
commit 828d1d74aa
32 changed files with 274 additions and 327 deletions
@@ -102,11 +102,11 @@ impl pallet_transaction_storage::Config for Test {
pub fn new_test_ext() -> sp_io::TestExternalities {
let t = GenesisConfig {
frame_system: Default::default(),
pallet_balances: pallet_balances::GenesisConfig::<Test> {
system: Default::default(),
balances: pallet_balances::GenesisConfig::<Test> {
balances: vec![(1, 1000000000), (2, 100), (3, 100), (4, 100)]
},
pallet_transaction_storage: pallet_transaction_storage::GenesisConfig::<Test> {
transaction_storage: pallet_transaction_storage::GenesisConfig::<Test> {
storage_period: 10,
byte_fee: 2,
entry_fee: 200,