Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed May 21, 2024
1 parent 329cae7 commit 9127d98
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions pallets/regions/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -80,15 +80,19 @@ mod benchmarks {
let module = IsmpModuleCallback::<T>::default();
#[block]
{
assert_ok!(module.on_accept(Post {
source: <T as crate::Config>::CoretimeChain::get(),
dest: <T as crate::Config>::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: <T as crate::Config>::CoretimeChain::get(),
dest: <T as crate::Config>::CoretimeChain::get(),
nonce: Default::default(),
from: Default::default(),
to: Default::default(),
timeout_timestamp: Default::default(),
data: Default::default(),
}),
IsmpCustomError::NotSupported
);
}

Ok(())
Expand Down

0 comments on commit 9127d98

Please sign in to comment.