From 9127d982acfc6de8ead7d83fad53c3918f6f6ef9 Mon Sep 17 00:00:00 2001 From: Sergej Date: Tue, 21 May 2024 11:53:52 +0200 Subject: [PATCH] fix --- pallets/regions/src/benchmarking.rs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pallets/regions/src/benchmarking.rs b/pallets/regions/src/benchmarking.rs index d00c286c..8133ebc8 100644 --- a/pallets/regions/src/benchmarking.rs +++ b/pallets/regions/src/benchmarking.rs @@ -21,7 +21,7 @@ use super::*; use codec::Encode; use frame_benchmarking::v2::*; -use frame_support::{assert_ok, traits::nonfungible::Mutate}; +use frame_support::{assert_err, assert_ok, traits::nonfungible::Mutate}; use frame_system::RawOrigin; use ismp::router::{Get as IsmpGet, GetResponse}; use pallet_broker::{CoreMask, RegionId, RegionRecord}; @@ -80,15 +80,19 @@ mod benchmarks { let module = IsmpModuleCallback::::default(); #[block] { - assert_ok!(module.on_accept(Post { - source: ::CoretimeChain::get(), - dest: ::CoretimeChain::get(), - nonce: Default::default(), - from: Default::default(), - to: Default::default(), - timeout_timestamp: Default::default(), - data: Default::default(), - })); + // We don't support ISMP post. + assert_err!( + module.on_accept(Post { + source: ::CoretimeChain::get(), + dest: ::CoretimeChain::get(), + nonce: Default::default(), + from: Default::default(), + to: Default::default(), + timeout_timestamp: Default::default(), + data: Default::default(), + }), + IsmpCustomError::NotSupported + ); } Ok(())