fix #990
This commit is contained in:
@ -18,26 +18,13 @@ fi
|
|||||||
garbage_address=vS3ngn1TfQmpsW1Z4NkLuqNAQFF3dYQw8UZ6TCx9bmq
|
garbage_address=vS3ngn1TfQmpsW1Z4NkLuqNAQFF3dYQw8UZ6TCx9bmq
|
||||||
|
|
||||||
check_balance_output() {
|
check_balance_output() {
|
||||||
# TODO go back to a single expected_output once snaps and wallet
|
declare expected_output="$1"
|
||||||
# are in sync
|
|
||||||
#
|
|
||||||
# declare expected_output="$1"
|
|
||||||
# exec 42>&1
|
|
||||||
# output=$($wallet balance | tee >(cat - >&42))
|
|
||||||
# if [[ ! "$output" =~ $expected_output ]]; then
|
|
||||||
# echo "Balance is incorrect. Expected: $expected_output"
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
exec 42>&1
|
exec 42>&1
|
||||||
output=$($wallet balance | tee >(cat - >&42))
|
output=$($wallet balance | tee >(cat - >&42))
|
||||||
|
if [[ ! "$output" =~ $expected_output ]]; then
|
||||||
for expected_output in "$@"; do
|
|
||||||
if [[ "$output" =~ $expected_output ]]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo "Balance is incorrect. Expected: $expected_output"
|
echo "Balance is incorrect. Expected: $expected_output"
|
||||||
exit 1
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pay_and_confirm() {
|
pay_and_confirm() {
|
||||||
|
Reference in New Issue
Block a user