Skip to content

Commit c69af93

Browse files
committed
tests: tolerate only the expected wormhole push failure in solana e2e
1 parent 1091cd1 commit c69af93

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

cli/test/solana.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,18 @@ else
236236
fi
237237
ntt status || true
238238

239-
ntt push --payer "$keypair" --yes || true
239+
push_exit=0
240+
push_output=$(ntt push --payer "$keypair" --yes 2>&1) || push_exit=$?
241+
echo "$push_output"
242+
if [ "$push_exit" -ne 0 ]; then
243+
if echo "$push_output" | grep -q "Push aborted due to registration errors" \
244+
&& echo "$push_output" | grep -q "AccountNotInitialized"; then
245+
echo "ntt push failed as expected (Wormhole program not loaded in the local validator); continuing."
246+
else
247+
echo "ntt push failed for an unexpected reason (exit $push_exit)" >&2
248+
exit "$push_exit"
249+
fi
250+
fi
240251

241252
cat "$DEPLOYMENT_FILE"
242253

0 commit comments

Comments
 (0)