Skip to content

Commit

Permalink
Replace our assert_expected_events for the one in xcm_emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
dimartiro committed Dec 16, 2024
1 parent 7ea312c commit e5d5384
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 273 deletions.
3 changes: 1 addition & 2 deletions runtime/dancebox/src/tests/common/xcm/core_buyer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::xcm::{
core_buyer_common::*,
mocknets::{DanceboxRococoPara as Dancebox, RococoRelay as Rococo, RococoRelayPallet},
Expand All @@ -26,7 +25,7 @@ use {
polkadot_runtime_parachains::on_demand as parachains_assigner_on_demand,
staging_xcm::latest::{MaybeErrorCode, Response},
tp_traits::ParaId,
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

const PARATHREAD_ID: u32 = 3333;
Expand Down
3 changes: 1 addition & 2 deletions runtime/dancebox/src/tests/common/xcm/core_buyer_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::{
empty_genesis_data, run_to_session, set_dummy_boot_node, start_block,
xcm::{
Expand All @@ -42,7 +41,7 @@ use {
staging_xcm::v3::QueryId,
staging_xcm_executor::traits::ConvertLocation,
tp_traits::{ParaId, SlotFrequency},
xcm_emulator::{Chain, RelayChain},
xcm_emulator::{assert_expected_events, Chain, RelayChain},
};

pub const PARATHREAD_ID: u32 = 3333;
Expand Down
3 changes: 1 addition & 2 deletions runtime/dancebox/src/tests/common/xcm/delivery_fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::xcm::{
mocknets::{
DanceboxPara as Dancebox, DanceboxParaPallet, DanceboxSender,
Expand All @@ -33,7 +32,7 @@ use {
latest::prelude::{Junctions::X1, *},
VersionedLocation, VersionedXcm,
},
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

#[test]
Expand Down
103 changes: 0 additions & 103 deletions runtime/dancebox/src/tests/common/xcm/expected_event_checker.rs

This file was deleted.

3 changes: 1 addition & 2 deletions runtime/dancebox/src/tests/common/xcm/force_core_buyer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::xcm::{
core_buyer_common::*,
mocknets::{DanceboxRococoPara as Dancebox, RococoRelay as Rococo, RococoRelayPallet},
Expand All @@ -26,7 +25,7 @@ use {
polkadot_runtime_parachains::on_demand as parachains_assigner_on_demand,
staging_xcm::latest::{MaybeErrorCode, Response},
tp_traits::ParaId,
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::xcm::{
mocknets::{
DanceboxEmptyReceiver, DanceboxPara as Dancebox, DanceboxParaPallet,
Expand All @@ -38,7 +37,7 @@ use {
VersionedLocation, VersionedXcm,
},
staging_xcm_executor::traits::ConvertLocation,
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

#[test]
Expand Down
3 changes: 1 addition & 2 deletions runtime/dancebox/src/tests/common/xcm/foreign_sovereigns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::xcm::{
mocknets::{
DanceboxPara as Dancebox, DanceboxParaPallet, EthereumEmptyReceiver,
Expand All @@ -38,7 +37,7 @@ use {
},
staging_xcm_executor::traits::ConvertLocation,
westend_runtime_constants::currency::UNITS as WND,
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

#[test]
Expand Down
3 changes: 0 additions & 3 deletions runtime/dancebox/src/tests/common/xcm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ mod token_derivative_reception_relay_simple_container;
mod transact;
mod trap;

#[macro_use]
mod expected_event_checker;

pub use {
paste,
xcm_emulator::{bx, Parachain as Para, RelayChain as Relay, TestExt},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@
// along with Tanssi. If not, see <http://www.gnu.org/licenses/>

use {
crate::{
assert_expected_events,
tests::common::xcm::{
mocknets::{
DanceboxPara as Dancebox, DanceboxParaPallet, DanceboxSender,
SimpleTemplateEmptyReceiver, SimpleTemplatePara as SimpleTemplate,
SimpleTemplateParaPallet, SimpleTemplateSender, WestendRelay as Westend,
WestendRelayPallet, WestendSender,
},
*,
crate::tests::common::xcm::{
mocknets::{
DanceboxPara as Dancebox, DanceboxParaPallet, DanceboxSender,
SimpleTemplateEmptyReceiver, SimpleTemplatePara as SimpleTemplate,
SimpleTemplateParaPallet, SimpleTemplateSender, WestendRelay as Westend,
WestendRelayPallet, WestendSender,
},
*,
},
frame_support::{
assert_noop, assert_ok,
Expand All @@ -37,7 +34,7 @@ use {
latest::prelude::{Junctions::*, *},
VersionedLocation,
},
xcm_emulator::Chain,
xcm_emulator::{assert_expected_events, Chain},
};

#[allow(unused_assignments)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::xcm::{
mocknets::{
DanceboxPara as Dancebox, DanceboxParaPallet, DanceboxReceiver,
Expand All @@ -36,7 +35,7 @@ use {
latest::prelude::{Junctions::*, *},
VersionedLocation,
},
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

#[allow(unused_assignments)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@
// along with Tanssi. If not, see <http://www.gnu.org/licenses/>

use {
crate::{
assert_expected_events,
tests::common::xcm::{
mocknets::{
DanceboxPara as Dancebox, DanceboxParaPallet, DanceboxSender, EthereumReceiver,
FrontierTemplatePara as FrontierTemplate, FrontierTemplateParaPallet,
},
*,
crate::tests::common::xcm::{
mocknets::{
DanceboxPara as Dancebox, DanceboxParaPallet, DanceboxSender, EthereumReceiver,
FrontierTemplatePara as FrontierTemplate, FrontierTemplateParaPallet,
},
*,
},
frame_support::{
assert_ok,
Expand All @@ -35,7 +32,7 @@ use {
latest::prelude::{Junctions::*, *},
VersionedLocation,
},
xcm_emulator::Chain,
xcm_emulator::{assert_expected_events, Chain},
};

#[allow(unused_assignments)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::xcm::{
mocknets::{
DanceboxPara as Dancebox, DanceboxParaPallet, DanceboxSender,
Expand All @@ -36,7 +35,7 @@ use {
latest::prelude::{Junctions::*, *},
VersionedLocation,
},
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

#[allow(unused_assignments)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::xcm::{
mocknets::{
DanceboxPara as Dancebox, DanceboxParaPallet, DanceboxReceiver,
Expand All @@ -34,7 +33,7 @@ use {
latest::prelude::{Junctions::*, *},
VersionedLocation,
},
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

#[allow(unused_assignments)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::xcm::{
mocknets::{
EthereumReceiver, FrontierTemplatePara as FrontierTemplate,
Expand All @@ -36,7 +35,7 @@ use {
latest::prelude::{Junctions::*, *},
VersionedLocation,
},
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

#[allow(unused_assignments)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

use {
crate::{
assert_expected_events,
tests::common::xcm::{
mocknets::{
SimpleTemplatePara as SimpleTemplate, SimpleTemplateParaPallet,
Expand All @@ -34,7 +33,7 @@ use {
latest::prelude::{Junctions::*, *},
VersionedLocation,
},
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

#[allow(unused_assignments)]
Expand Down
3 changes: 1 addition & 2 deletions runtime/dancebox/src/tests/common/xcm/transact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use crate::tests::common::xcm::*;

use {
crate::{
assert_expected_events,
tests::common::xcm::mocknets::{
DanceboxPara as Dancebox, FrontierTemplatePara as FrontierTemplate,
FrontierTemplateParaPallet, SimpleTemplatePara as SimpleTemplate,
Expand All @@ -36,7 +35,7 @@ use {
},
staging_xcm_builder::{ParentIsPreset, SiblingParachainConvertsVia},
staging_xcm_executor::traits::ConvertLocation,
xcm_emulator::Chain,
xcm_emulator::{Chain, assert_expected_events},
};

#[test]
Expand Down
Loading

0 comments on commit e5d5384

Please sign in to comment.