Skip to content

Commit

Permalink
fix bridge tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberphysic4l committed Jan 15, 2025
1 parent 37a8baf commit e36a0df
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions crates/iota-framework/packages/bridge/tests/bridge_env.move
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module bridge::bridge_env {
use iota::test_scenario::{Self, Scenario};
use iota::test_utils::destroy;
use iota_system::governance_test_utils::{
advance_epoch_with_reward_amounts,
advance_epoch_with_balanced_reward_amounts,
create_iota_system_state_for_testing,
create_validator_for_testing
};
Expand Down Expand Up @@ -267,7 +267,7 @@ module bridge::bridge_env {
);
env.validators = validators_info;
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, scenario);
}

//
Expand Down
24 changes: 12 additions & 12 deletions crates/iota-framework/packages/bridge/tests/committee_test.move
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module bridge::committee_test {
use iota::{hex, test_scenario, test_utils::{Self, assert_eq}};
use bridge::chain_ids;
use iota_system::governance_test_utils::{
advance_epoch_with_reward_amounts,
advance_epoch_with_balanced_reward_amounts,
create_iota_system_state_for_testing,
create_validator_for_testing
};
Expand Down Expand Up @@ -112,7 +112,7 @@ module bridge::committee_test {
create_validator_for_testing(@0xC, 100, ctx)
];
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);
test_scenario::next_tx(&mut scenario, @0x0);

let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);
Expand Down Expand Up @@ -162,7 +162,7 @@ module bridge::committee_test {
create_validator_for_testing(@0xA, 100, ctx),
];
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);
test_scenario::next_tx(&mut scenario, @0x0);

let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);
Expand Down Expand Up @@ -210,7 +210,7 @@ module bridge::committee_test {
create_validator_for_testing(@0xA, 100, ctx),
];
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);
test_scenario::next_tx(&mut scenario, @0x0);

let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);
Expand Down Expand Up @@ -259,7 +259,7 @@ module bridge::committee_test {
create_validator_for_testing(@0xC, 100, ctx)
];
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);
test_scenario::next_tx(&mut scenario, @0x0);

let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);
Expand All @@ -284,7 +284,7 @@ module bridge::committee_test {
create_validator_for_testing(@0xC, 100, ctx)
];
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);
test_scenario::next_tx(&mut scenario, @0x0);

let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);
Expand Down Expand Up @@ -312,7 +312,7 @@ module bridge::committee_test {
create_validator_for_testing(@0xF, 100, ctx)
];
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);
test_scenario::next_tx(&mut scenario, @0x0);

let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);
Expand All @@ -328,7 +328,7 @@ module bridge::committee_test {
// Validator 0xA become inactive, total voting power become 50%
iota_system::request_remove_validator(&mut system_state, &mut tx(@0xA, 0));
test_scenario::return_shared(system_state);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);

let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);

Expand All @@ -355,7 +355,7 @@ module bridge::committee_test {
create_validator_for_testing(@0xC, 100, ctx)
];
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);
test_scenario::next_tx(&mut scenario, @0x0);

let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);
Expand Down Expand Up @@ -401,7 +401,7 @@ module bridge::committee_test {
create_validator_for_testing(@0xC, 100, ctx)
];
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);
test_scenario::next_tx(&mut scenario, @0x0);

let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);
Expand Down Expand Up @@ -436,7 +436,7 @@ module bridge::committee_test {
create_validator_for_testing(@0xC, 100, ctx)
];
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);

test_scenario::next_tx(&mut scenario, @0x0);
let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);
Expand Down Expand Up @@ -467,7 +467,7 @@ module bridge::committee_test {
create_validator_for_testing(@0xC, 100, ctx)
];
create_iota_system_state_for_testing(validators, 0, 0, ctx);
advance_epoch_with_reward_amounts(0, 0, &mut scenario);
advance_epoch_with_balanced_reward_amounts(0, 0, &mut scenario);

test_scenario::next_tx(&mut scenario, @0x0);
let mut system_state = test_scenario::take_shared<IotaSystemState>(&scenario);
Expand Down

0 comments on commit e36a0df

Please sign in to comment.