From cf6801d35b3eb4c324559e1391260dc42633305b Mon Sep 17 00:00:00 2001 From: turtlebasket Date: Thu, 8 Sep 2022 22:43:24 +0000 Subject: [PATCH] test log func for swallowing command output --- tests/testutil.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/testutil.sh b/tests/testutil.sh index cc01c1f..2c039a5 100644 --- a/tests/testutil.sh +++ b/tests/testutil.sh @@ -11,6 +11,12 @@ accounts=$(curl -s http://localhost:1317/cosmos/auth/v1beta1/accounts | jq -M ". declare -g ALICE=$(echo $accounts | jq -rM '.[] | select(.account_number == "0") | .address') declare -g BOB=$(echo $accounts | jq -rM '.[] | select(.account_number == "1") | .address') +function swallow { + read -r out + log_ok + echo $1 + swallow error +} + function assert_eq { read -r out if [[ $out = $1 ]]; then