Skip to content

Commit

Permalink
Refactor runtime tests (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier authored Jan 12, 2023
1 parent 943d7c4 commit c9f54e3
Show file tree
Hide file tree
Showing 23 changed files with 416 additions and 1,066 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion node/src/chain_spec/crab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use cumulus_primitives_core::ParaId;
// darwinia
use super::*;
use crab_runtime::*;
use dc_primitives::*;
// frontier
use fp_evm::GenesisAccount;
// substrate
Expand Down
1 change: 0 additions & 1 deletion node/src/chain_spec/darwinia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use cumulus_primitives_core::ParaId;
// darwinia
use super::*;
use darwinia_runtime::*;
use dc_primitives::*;
// frontier
use fp_evm::GenesisAccount;
// substrate
Expand Down
1 change: 0 additions & 1 deletion node/src/chain_spec/pangolin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use std::{
use cumulus_primitives_core::ParaId;
// darwinia
use super::*;
use dc_primitives::*;
use pangolin_runtime::*;
// frontier
use fp_evm::GenesisAccount;
Expand Down
3 changes: 2 additions & 1 deletion pallet/account-migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ pub mod pallet {
}
pub use pallet::*;

fn sr25519_signable_message(spec_name: &[u8], account_id_20: &AccountId20) -> Vec<u8> {
/// Build a Darwinia account migration message.
pub fn sr25519_signable_message(spec_name: &[u8], account_id_20: &AccountId20) -> Vec<u8> {
[
b"I authorize the migration to ",
account_id_20.0.as_slice(),
Expand Down
14 changes: 8 additions & 6 deletions runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ xcm-builder = { default-features = false, git = "https://github.com/paritytech/
xcm-executor = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.30" }

# substrate
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }

[features]
default = ["std"]
Expand All @@ -61,3 +61,5 @@ std = [
"sp-runtime/std",
"sp-std/std",
]

test = []
3 changes: 3 additions & 0 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ pub use bp_darwinia_core as bp_crab;
pub use bp_darwinia_core as bp_darwinia;
pub use bp_darwinia_core as bp_pangolin;

// #[cfg(feature = "test")]
pub mod test;

// darwinia
use dc_primitives::*;
// substrate
Expand Down
Loading

0 comments on commit c9f54e3

Please sign in to comment.