Skip to content

Commit

Permalink
change(pallet-communities): ensure benchmarks run without any predefi…
Browse files Browse the repository at this point in the history
…ned runtime setup
  • Loading branch information
pandres95 committed Mar 9, 2024
1 parent 89758ca commit b61b0e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion pallets/communities/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
6 changes: 0 additions & 6 deletions pallets/communities/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,6 @@ pub const COMMUNITY: CommunityId = CommunityId::new(1);
pub const COMMUNITY_ORIGIN: OriginCaller =
OriginCaller::Communities(pallet_communities::Origin::<Test>::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()
Expand Down

0 comments on commit b61b0e4

Please sign in to comment.