Skip to content

Commit 6366227

Browse files
committed
test-templates.sh: add calling diagnose to CHECKS onrestart and user-v2
Signed-off-by: Norio Nomura <[email protected]>
1 parent be93284 commit 6366227

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

hack/test-templates.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,11 @@ if [[ -n ${CHECKS["restart"]} ]]; then
334334

335335
export ftp_proxy=my.proxy:8021
336336
INFO "Restarting \"$NAME\""
337-
limactl start "$NAME"
337+
if ! limactl start "$NAME"; then
338+
ERROR "Failed to start \"$NAME\""
339+
diagnose "$NAME"
340+
exit 1
341+
fi
338342

339343
INFO "Make sure proxy setting is updated"
340344
got=$(limactl shell "$NAME" env | grep FTP_PROXY)
@@ -367,7 +371,11 @@ if [[ -n ${CHECKS["user-v2"]} ]]; then
367371
INFO "Testing user-v2 network"
368372
secondvm="$NAME-1"
369373
"${LIMACTL_CREATE[@]}" "$FILE" --name "$secondvm"
370-
limactl start "$secondvm"
374+
if ! limactl start "$secondvm"; then
375+
ERROR "Failed to start \"$secondvm\""
376+
diagnose "$secondvm"
377+
exit 1
378+
fi
371379
secondvmDNS="lima-$secondvm.internal"
372380
INFO "DNS of $secondvm is $secondvmDNS"
373381
set -x

0 commit comments

Comments
 (0)