Skip to content

Commit c01c873

Browse files
committed
fix e2e
1 parent 8274a76 commit c01c873

1 file changed

Lines changed: 6 additions & 23 deletions

File tree

local/e2e_test.sh

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,22 @@
22
set -euo pipefail
33

44
run_txn() {
5-
local desc="$1"
5+
desc=$1
66
shift
7-
87
echo ">>> $desc"
8+
result=$(flow transactions send "$@" 2>&1 || true)
99

10-
# Capture output AND whether the CLI itself failed
11-
local result status=0
12-
result="$(flow transactions send "$@" 2>&1)" || status=$?
13-
14-
# Always show the Flow output
1510
echo "$result"
1611

17-
# If the CLI failed (network, auth, etc.)
18-
if [[ $status -ne 0 ]]; then
19-
echo "❌ Transaction '$desc' failed (flow CLI error, exit $status)"
20-
exit 1
21-
fi
22-
23-
# Must be SEALED
24-
if ! echo "$result" | grep -qE 'Status[[:space:]]+✅[[:space:]]+SEALED|(^|[[:space:]])SEALED($|[[:space:]])'; then
12+
if ! echo "$result" | grep -q "SEALED"; then
2513
echo "❌ Transaction '$desc' failed (not SEALED)"
2614
exit 1
2715
fi
28-
29-
# Detect execution errors even when SEALED
30-
if echo "$result" | grep -qiE \
31-
'(^|[[:space:]])❌[[:space:]]*Transaction Error|(^|[[:space:]])Transaction Error|cadence runtime error|error:[[:space:]]+panic|error:[[:space:]]+assertion failed|\[Error Code:'; then
32-
echo "❌ Transaction '$desc' failed (execution error detected despite SEALED)"
16+
if echo "$result" | grep -q "Transaction Error"; then
17+
echo "❌ Transaction '$desc' failed (Error)"
3318
exit 1
3419
fi
35-
36-
echo "✅ '$desc' succeeded."
37-
}}
20+
}
3821

3922
run_txn "Grant Tide Beta access to test user" \
4023
./cadence/transactions/flow-vaults/admin/grant_beta.cdc \

0 commit comments

Comments
 (0)