Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Fix breaking tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Apr 1, 2024
1 parent 5c16e2d commit 4a69a58
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
1 change: 1 addition & 0 deletions bridges/snowbridge/pallets/outbound-queue/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ pub fn mock_message(sibling_para_id: u32) -> Message {
recipient: Default::default(),
amount: 0,
},
remote_fee: (Default::default(), 0),
},
}
}
8 changes: 0 additions & 8 deletions bridges/snowbridge/pallets/outbound-queue/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ fn submit_message_fail_too_large() {
});
}

#[test]
fn convert_from_ether_decimals() {
assert_eq!(
OutboundQueue::convert_from_ether_decimals(1_000_000_000_000_000_000),
1_000_000_000_000
);
}

#[test]
fn commit_exits_early_if_no_processed_messages() {
new_tester().execute_with(|| {
Expand Down
1 change: 1 addition & 0 deletions bridges/snowbridge/primitives/router/src/outbound/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ macro_rules! match_expression {
};
}

#[derive(PartialEq, Debug)]
pub struct CommandWithFee {
pub command: AgentExecuteCommand,
pub remote_fee: (H160, u128),
Expand Down
8 changes: 4 additions & 4 deletions bridges/snowbridge/primitives/router/src/outbound/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ fn xcm_converter_convert_success() {
amount: 1000,
};
let result = converter.convert();
assert_eq!(result, Ok((expected_payload, [0; 32])));
assert_eq!(result.unwrap().command, expected_payload);
}

#[test]
Expand Down Expand Up @@ -450,7 +450,7 @@ fn xcm_converter_convert_without_buy_execution_yields_success() {
amount: 1000,
};
let result = converter.convert();
assert_eq!(result, Ok((expected_payload, [0; 32])));
assert_eq!(result.unwrap().command, expected_payload);
}

#[test]
Expand Down Expand Up @@ -485,7 +485,7 @@ fn xcm_converter_convert_with_wildcard_all_asset_filter_succeeds() {
amount: 1000,
};
let result = converter.convert();
assert_eq!(result, Ok((expected_payload, [0; 32])));
assert_eq!(result.unwrap().command, expected_payload);
}

#[test]
Expand Down Expand Up @@ -520,7 +520,7 @@ fn xcm_converter_convert_with_fees_less_than_reserve_yields_success() {
amount: 1000,
};
let result = converter.convert();
assert_eq!(result, Ok((expected_payload, [0; 32])));
assert_eq!(result.unwrap().command, expected_payload);
}

#[test]
Expand Down

0 comments on commit 4a69a58

Please sign in to comment.