From c5c56f07c36a58f7379145c7d4a4793150e22fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Negovanovi=C4=87?= Date: Thu, 19 Sep 2024 21:22:54 +0200 Subject: [PATCH] test: logs --- test/bridge-e2e.bats | 8 +++----- test/helpers/common.bash | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/bridge-e2e.bats b/test/bridge-e2e.bats index 0902a332..c392e647 100644 --- a/test/bridge-e2e.bats +++ b/test/bridge-e2e.bats @@ -95,11 +95,9 @@ setup() { local gas_token_final_sender_balance=$(echo "$output" | tail -n 1 | awk '{print $1}') - local expected_balance=$( - echo "$gas_token_init_sender_balance + $wei_amount" | - bc | - awk '{print $1}' - ) + local expected_balance=$(echo "$gas_token_init_sender_balance + $wei_amount" | + bc | + awk '{print $1}') echo "Sender balance ($sender_addr) (gas token L1): $gas_token_final_sender_balance" >&3 assert_equal "$gas_token_final_sender_balance" "$expected_balance" diff --git a/test/helpers/common.bash b/test/helpers/common.bash index a60bde18..9dbd29b6 100644 --- a/test/helpers/common.bash +++ b/test/helpers/common.bash @@ -291,9 +291,11 @@ function verify_native_token_balance() { # Trim 'ether' from ether_amount if it exists ether_amount=$(echo "$ether_amount" | sed 's/ether//') local amount_wei=$(cast --to-wei "$ether_amount") + # TODO: REMOVE + echo "Initial wei balance $initial_balance_wei, Wei amount: $amount_wei" >&3 # Get final balance in wei (after the operation) - local final_balance_wei=$(cast balance "$account" --rpc-url "$rpc_url") + local final_balance_wei=$(cast balance "$account" --rpc-url "$rpc_url" | awk '{print $1}') # Calculate expected final balance (initial_balance + amount) local expected_final_balance_wei=$((initial_balance_wei + amount_wei))