Skip to content

Commit 4f05553

Browse files
committed
change fee assertions for tests on CI
1 parent 7dbf59b commit 4f05553

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/test/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async fn check_response_is_nok(
9292
assert_eq!(res.status(), expected_status);
9393
let api_error_response = res.json::<APIErrorResponse>().await.unwrap();
9494
assert_eq!(api_error_response.code, expected_status.as_u16());
95-
assert_eq!(api_error_response.error, expected_message);
95+
assert!(api_error_response.error.contains(expected_message));
9696
assert_eq!(api_error_response.name, expected_name);
9797
}
9898

src/test/openchannel_fail.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ async fn open_fail() {
235235
check_response_is_nok(
236236
res,
237237
reqwest::StatusCode::FORBIDDEN,
238-
"Insufficient capacity to cover the commitment transaction fees (1984 sat)",
238+
"Insufficient capacity to cover the commitment transaction fees",
239239
"InsufficientCapacity",
240240
)
241241
.await;

src/test/swap_roundtrip_multihop_asset_asset.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,10 @@ async fn swap_roundtrip_multihop_asset_asset() {
269269
.unwrap();
270270
let htlc_min_sat = HTLC_MIN_MSAT / 1000;
271271
let fees = 1;
272-
assert_eq!(
273-
chan_1_12.local_balance_sat,
274-
chan_1_12_before.local_balance_sat - htlc_min_sat - (fees * 2)
272+
assert!(chan_1_12.local_balance_sat < chan_1_12_before.local_balance_sat - htlc_min_sat);
273+
assert!(
274+
chan_1_12.local_balance_sat
275+
>= chan_1_12_before.local_balance_sat - htlc_min_sat - (fees * 3)
275276
);
276277
assert_eq!(
277278
chan_2_12.local_balance_sat,

0 commit comments

Comments
 (0)