Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Jun 11, 2021
1 parent 7e345ea commit c2374ab
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 9 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ use cumulus_client_network::build_block_announce_validator;
use cumulus_client_service::{
prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,
};
use cumulus_primitives_core::{
ParaId
};
use cumulus_primitives_core::ParaId;

// Substrate Imports
use sc_client_api::ExecutorProvider;
Expand Down
3 changes: 3 additions & 0 deletions pallets/asset-index/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ impl<AssetId, Balance> AssetRecorder<AssetId, Balance> for MockAssetRecorder {
// param types for balances
parameter_types! {
pub const MaxLocks: u32 = 1024;
pub const MaxReserves: u32 = 1024;
pub static ExistentialDeposit: Balance = 0;
}

Expand All @@ -109,6 +110,8 @@ impl pallet_balances::Config for Test {
>;
type MaxLocks = MaxLocks;
type WeightInfo = ();
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
}

impl pallet_asset_depository::Config for Test {
Expand Down
2 changes: 1 addition & 1 deletion pallets/committee/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ fn propose_constituent_works() {
));

// test if proposal submitted with event
if let Event::pallet_committee(crate::Event::Proposed(_, _, hash)) = last_event() {
if let Event::Committee(crate::Event::Proposed(_, _, hash)) = last_event() {
assert_eq!(&[hash], Committee::active_proposals().as_slice());

// vote Aye on adding new constituent
Expand Down
3 changes: 3 additions & 0 deletions pallets/local-treasury/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ impl system::Config for Test {
// param types for balances
parameter_types! {
pub const MaxLocks: u32 = 1024;
pub const MaxReserves: u32 = 1024;
pub static ExistentialDeposit: Balance = 0;
}

Expand All @@ -84,6 +85,8 @@ impl pallet_balances::Config for Test {
>;
type MaxLocks = MaxLocks;
type WeightInfo = ();
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
}

pub(crate) const LOCAL_TREASURE_PALLET_ID: PalletId = PalletId(*b"12345678");
Expand Down
2 changes: 2 additions & 0 deletions pallets/price-feed/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ impl pallet_balances::Config for Test {
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = ();
type MaxReserves = ();
type ReserveIdentifier = [u8; 8];
}

pub(crate) const MIN_RESERVE: u64 = 100;
Expand Down
1 change: 1 addition & 0 deletions primitives/xcm-calls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ sp-core = { git = 'https://github.com/paritytech/substrate', branch = 'master' }
sp-runtime = { git = 'https://github.com/paritytech/substrate', branch = 'master' }
sp-staking = { git = 'https://github.com/paritytech/substrate', branch = 'master' }
frame-election-provider-support = { git = 'https://github.com/paritytech/substrate', branch = 'master' }
max-encoded-len = { git = 'https://github.com/paritytech/substrate', branch = 'master' }

## Substrate Pallet Dependencies
pallet-staking = { git = 'https://github.com/paritytech/substrate', branch = 'master', default-features = false }
Expand Down
14 changes: 9 additions & 5 deletions primitives/xcm-calls/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@ mod tests {

use codec::{Decode, Encode};
use frame_election_provider_support::onchain;
use frame_support::sp_runtime::traits::BlakeTwo256;
use frame_support::traits::OnUnbalanced;
use frame_support::traits::{Imbalance, InstanceFilter};
use frame_support::{
parameter_types,
traits::{Currency, FindAuthor, OneSessionHandler},
sp_runtime::traits::BlakeTwo256,
traits::{
Currency, FindAuthor, Imbalance, InstanceFilter, MaxEncodedLen, OnUnbalanced,
OneSessionHandler,
},
weights::constants::RocksDbWeight,
};
use pallet_staking as staking;
Expand Down Expand Up @@ -209,6 +210,7 @@ mod tests {
frame_support::weights::constants::WEIGHT_PER_SECOND * 2
);
pub const MaxLocks: u32 = 1024;
pub const MaxReserves: u32 = 50;
pub static SessionsPerEra: sp_staking::SessionIndex = 3;
pub static ExistentialDeposit: Balance = 1;
pub static SlashDeferDuration: EraIndex = 0;
Expand Down Expand Up @@ -249,6 +251,8 @@ mod tests {
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = ();
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
}
parameter_types! {
pub const UncleGenerations: u64 = 0;
Expand Down Expand Up @@ -354,7 +358,7 @@ mod tests {
}

/// The type used to represent the kinds of proxying allowed.
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug)]
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, Debug, MaxEncodedLen)]
pub enum ProxyType {
Any = 0,
NonTransfer = 1,
Expand Down

0 comments on commit c2374ab

Please sign in to comment.