diff --git a/frame/bounties/src/tests.rs b/frame/bounties/src/tests.rs index 9fe34b16029cb..0f9f3e68df548 100644 --- a/frame/bounties/src/tests.rs +++ b/frame/bounties/src/tests.rs @@ -194,13 +194,12 @@ type TreasuryError = pallet_treasury::Error; type TreasuryError1 = pallet_treasury::Error; pub fn new_test_ext() -> sp_io::TestExternalities { - let mut ext: sp_io::TestExternalities = RuntimeGenesisConfig { + let mut ext: sp_io::TestExternalities = BuildStorage::build_storage(&RuntimeGenesisConfig { system: frame_system::GenesisConfig::default(), balances: pallet_balances::GenesisConfig { balances: vec![(0, 100), (1, 98), (2, 1)] }, treasury: Default::default(), treasury_1: Default::default(), - } - .build_storage() + }) .unwrap() .into(); ext.execute_with(|| System::set_block_number(1)); diff --git a/frame/collective/src/tests.rs b/frame/collective/src/tests.rs index 8d4e0a4a82cd7..057f668a78eb2 100644 --- a/frame/collective/src/tests.rs +++ b/frame/collective/src/tests.rs @@ -177,20 +177,20 @@ impl ExtBuilder { } pub fn build(self) -> sp_io::TestExternalities { - let mut ext: sp_io::TestExternalities = RuntimeGenesisConfig { - collective: pallet_collective::GenesisConfig { - members: self.collective_members, - phantom: Default::default(), - }, - collective_majority: pallet_collective::GenesisConfig { - members: vec![1, 2, 3, 4, 5], - phantom: Default::default(), - }, - default_collective: Default::default(), - } - .build_storage() - .unwrap() - .into(); + let mut ext: sp_io::TestExternalities = + BuildStorage::build_storage(&RuntimeGenesisConfig { + collective: pallet_collective::GenesisConfig { + members: self.collective_members, + phantom: Default::default(), + }, + collective_majority: pallet_collective::GenesisConfig { + members: vec![1, 2, 3, 4, 5], + phantom: Default::default(), + }, + default_collective: Default::default(), + }) + .unwrap() + .into(); ext.execute_with(|| System::set_block_number(1)); ext } diff --git a/frame/system/src/mock.rs b/frame/system/src/mock.rs index b484c22ad4fe4..4500a5f40fc60 100644 --- a/frame/system/src/mock.rs +++ b/frame/system/src/mock.rs @@ -126,7 +126,7 @@ pub const CALL: &::RuntimeCall = /// Create new externalities for `System` module tests. pub fn new_test_ext() -> sp_io::TestExternalities { let mut ext: sp_io::TestExternalities = - RuntimeGenesisConfig::default().build_storage().unwrap().into(); + BuildStorage::build_storage(&RuntimeGenesisConfig::default()).unwrap().into(); // Add to each test the initial weight of a block ext.execute_with(|| { System::register_extra_weight_unchecked( diff --git a/frame/tips/src/tests.rs b/frame/tips/src/tests.rs index 25043b413db07..6fe70b7f20b93 100644 --- a/frame/tips/src/tests.rs +++ b/frame/tips/src/tests.rs @@ -196,13 +196,12 @@ impl Config for Test { } pub fn new_test_ext() -> sp_io::TestExternalities { - let mut ext: sp_io::TestExternalities = RuntimeGenesisConfig { + let mut ext: sp_io::TestExternalities = BuildStorage::build_storage(&RuntimeGenesisConfig { system: frame_system::GenesisConfig::default(), balances: pallet_balances::GenesisConfig { balances: vec![(0, 100), (1, 98), (2, 1)] }, treasury: Default::default(), treasury_1: Default::default(), - } - .build_storage() + }) .unwrap() .into(); ext.execute_with(|| System::set_block_number(1));