Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
fix challenge period tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dharjeezy committed Jul 14, 2023
1 parent 2c38f55 commit 7d29de3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pallet-ismp/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ fn should_reject_updates_within_challenge_period() {
ext.execute_with(|| {
set_timestamp(None);
let host = Host::<Test>::default();
host.store_challenge_period(MOCK_CONSENSUS_STATE_ID, 1_000_000).unwrap();
check_challenge_period(&host).unwrap()
})
}
Expand All @@ -229,6 +230,7 @@ fn should_reject_messages_for_frozen_state_machines() {
ext.execute_with(|| {
set_timestamp(None);
let host = Host::<Test>::default();
host.store_challenge_period(MOCK_CONSENSUS_STATE_ID, 1_000_000).unwrap();
frozen_check(&host).unwrap()
})
}
Expand All @@ -241,6 +243,7 @@ fn should_reject_expired_check_clients() {
set_timestamp(None);
let host = Host::<Test>::default();
host.store_unbonding_period(MOCK_CONSENSUS_STATE_ID, 1_000_000).unwrap();
host.store_challenge_period(MOCK_CONSENSUS_STATE_ID, 1_000_000).unwrap();
check_client_expiry(&host).unwrap()
})
}
Expand All @@ -253,6 +256,7 @@ fn should_handle_post_request_timeouts_correctly() {
set_timestamp(None);
let host = Host::<Test>::default();
let dispatcher = Dispatcher::<Test>::default();
host.store_challenge_period(MOCK_CONSENSUS_STATE_ID, 1_000_000).unwrap();
timeout_post_processing_check(&host, &dispatcher).unwrap()
})
}
Expand All @@ -263,6 +267,7 @@ fn should_handle_get_request_timeouts_correctly() {
ext.execute_with(|| {
let host = Host::<Test>::default();
setup_mock_client::<_, Test>(&host);
host.store_challenge_period(MOCK_CONSENSUS_STATE_ID, 1_000_000).unwrap();
let requests = (0..2)
.into_iter()
.map(|i| {
Expand Down Expand Up @@ -306,6 +311,7 @@ fn should_handle_get_request_responses_correctly() {
let mut ext = new_test_ext();
ext.execute_with(|| {
let host = Host::<Test>::default();
host.store_challenge_period(MOCK_CONSENSUS_STATE_ID, 1_000_000).unwrap();
setup_mock_client::<_, Test>(&host);
let requests = (0..2)
.into_iter()
Expand Down

0 comments on commit 7d29de3

Please sign in to comment.