From 25199a1d0493c00a5356fd6aa09352f51317c989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Andr=C3=A9s=20Dorado=20Su=C3=A1rez?= Date: Fri, 8 Mar 2024 23:04:50 -0500 Subject: [PATCH] change(pallet-communities): ensure benchmarks run with default externalities --- pallets/communities/src/benchmarking.rs | 2 +- pallets/communities/src/tests/mock.rs | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/pallets/communities/src/benchmarking.rs b/pallets/communities/src/benchmarking.rs index 1f66a931..e06520aa 100644 --- a/pallets/communities/src/benchmarking.rs +++ b/pallets/communities/src/benchmarking.rs @@ -408,7 +408,7 @@ mod benchmarks { impl_benchmark_test_suite!( Communities, - crate::tests::mock::new_bench_ext(), + sp_io::TestExternalities::new(Default::default()), crate::tests::mock::Test ); } diff --git a/pallets/communities/src/tests/mock.rs b/pallets/communities/src/tests/mock.rs index fa2ced5b..8d15e276 100644 --- a/pallets/communities/src/tests/mock.rs +++ b/pallets/communities/src/tests/mock.rs @@ -425,12 +425,6 @@ pub const COMMUNITY: CommunityId = CommunityId::new(1); pub const COMMUNITY_ORIGIN: OriginCaller = OriginCaller::Communities(pallet_communities::Origin::::new(COMMUNITY)); -// Build genesis storage according to the mock runtime. -#[cfg(feature = "runtime-benchmarks")] -pub fn new_bench_ext() -> sp_io::TestExternalities { - TestEnvBuilder::new().build() -} - // Build genesis storage according to the mock runtime. pub fn new_test_ext(members: &[AccountId], memberships: &[MembershipId]) -> sp_io::TestExternalities { TestEnvBuilder::new()