Fix tanssi on main (#393)

* fix the tanssi build & tests

* fix fmt

* update features for coverage

* cleanup on coverage due runner out of space

* a bit more tests to pass the codecov check

* fix fmt
This commit is contained in:
Nikita Khateev
2024-12-30 14:13:55 +04:00
committed by GitHub
parent 9158633607
commit 43508d999f
10 changed files with 88 additions and 22 deletions
+6 -1
View File
@@ -189,6 +189,11 @@ impl AssetsConfig for OpenZeppelinRuntime {
type ForeignAssetModifierOrigin = EnsureRoot<AccountId>;
type WeightToFee = WeightToFee;
}
#[cfg(feature = "tanssi")]
impl TanssiConfig for OpenZeppelinRuntime {
type AuthorInherent = pallet_author_inherent::weights::SubstrateWeight<Runtime>;
type AuthoritiesNothing = pallet_cc_authorities_noting::weights::SubstrateWeight<Runtime>;
}
impl_openzeppelin_system!(OpenZeppelinRuntime);
#[cfg(not(feature = "tanssi"))]
impl_openzeppelin_consensus!(OpenZeppelinRuntime);
@@ -197,4 +202,4 @@ impl_openzeppelin_xcm!(OpenZeppelinRuntime);
impl_openzeppelin_assets!(OpenZeppelinRuntime);
#[cfg(feature = "tanssi")]
impl_openzeppelin_tanssi!();
impl_openzeppelin_tanssi!(OpenZeppelinRuntime);
+4
View File
@@ -207,6 +207,7 @@ mod test {
use crate::{types::ProxyType, AssetManager, RuntimeCall};
#[test]
#[cfg(not(feature = "tanssi"))]
fn test_filter_any() {
let call = RuntimeCall::CollatorSelection(
pallet_collator_selection::Call::set_desired_candidates { max: 10 },
@@ -216,6 +217,7 @@ mod test {
}
#[test]
#[cfg(not(feature = "tanssi"))]
fn test_filter_nontransfer() {
let proxy_type = ProxyType::NonTransfer;
let valid_call = RuntimeCall::CollatorSelection(
@@ -228,6 +230,7 @@ mod test {
}
#[test]
#[cfg(not(feature = "tanssi"))]
fn test_filter_cancel_proxy() {
let proxy_type = ProxyType::CancelProxy;
let invalid_call = RuntimeCall::CollatorSelection(
@@ -242,6 +245,7 @@ mod test {
}
#[test]
#[cfg(not(feature = "tanssi"))]
fn test_filter_collator() {
let proxy_type = ProxyType::Collator;
let valid_call = RuntimeCall::CollatorSelection(