-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Frame Pallets: Clean a lot of test setups #4642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7929301
clean a lot of test setups
kianenigma 885e6e8
Merge branch 'master' into kiz-clean-test-setups
kianenigma 5a13dcb
fix unused imports
kianenigma d771871
Update substrate/frame/system/benches/bench.rs
kianenigma e109f3c
Apply suggestions from code review
kianenigma 20df312
remove a lot more nonce stuff
kianenigma 6e203ea
Merge branch 'master' of github.com:paritytech/polkadot-sdk into kiz-…
kianenigma e9d63b7
fmt
kianenigma 2edb517
Merge branch 'master' into kiz-clean-test-setups
kianenigma d34218d
cleanup more
kianenigma 605c582
fmt
kianenigma f963bc5
Merge branch 'master' into kiz-clean-test-setups
kianenigma 5c848c0
Merge branch 'master' into kiz-clean-test-setups
kianenigma 80ad017
Merge branch 'master' of github.com:paritytech/polkadot-sdk into kiz-…
kianenigma 14f491f
Merge branch 'master' of github.com:paritytech/polkadot-sdk into kiz-…
kianenigma 2f98550
remove unused
kianenigma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,11 +20,7 @@ | |
| #![cfg(test)] | ||
|
|
||
| use crate::{self as pallet_indices, Config}; | ||
| use frame_support::{ | ||
| derive_impl, | ||
| traits::{ConstU32, ConstU64}, | ||
| }; | ||
| use sp_core::H256; | ||
| use frame_support::{derive_impl, traits::ConstU64}; | ||
| use sp_runtime::BuildStorage; | ||
|
|
||
| type Block = frame_system::mocking::MockBlock<Test>; | ||
|
|
@@ -40,28 +36,10 @@ frame_support::construct_runtime!( | |
|
|
||
| #[derive_impl(frame_system::config_preludes::TestDefaultConfig)] | ||
| impl frame_system::Config for Test { | ||
| type BaseCallFilter = frame_support::traits::Everything; | ||
| type BlockWeights = (); | ||
| type BlockLength = (); | ||
| type DbWeight = (); | ||
| type RuntimeOrigin = RuntimeOrigin; | ||
| type RuntimeCall = RuntimeCall; | ||
| type Nonce = u64; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Elsewhere you've removed this and converted the tests to use u32 - is it worth just doing this everywhere? |
||
| type Hash = H256; | ||
| type Hashing = ::sp_runtime::traits::BlakeTwo256; | ||
| type AccountId = u64; | ||
| type Lookup = Indices; | ||
| type Block = Block; | ||
| type RuntimeEvent = RuntimeEvent; | ||
| type Version = (); | ||
| type PalletInfo = PalletInfo; | ||
| type AccountData = pallet_balances::AccountData<u64>; | ||
| type OnNewAccount = (); | ||
| type OnKilledAccount = (); | ||
| type SystemWeightInfo = (); | ||
| type SS58Prefix = (); | ||
| type OnSetCode = (); | ||
| type MaxConsumers = ConstU32<16>; | ||
| } | ||
|
|
||
| impl pallet_balances::Config for Test { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.