Skip to content

Commit dbb6c09

Browse files
committed
hack/test-templates.sh: avoid using limactl restart
Signed-off-by: Norio Nomura <[email protected]>
1 parent 9a8d040 commit dbb6c09

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

hack/test-templates.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,20 +351,23 @@ fi
351351
if [[ -n ${CHECKS["ssh-over-vsock"]} ]]; then
352352
if [[ "$(limactl ls "${NAME}" --yq .vmType)" == "vz" ]]; then
353353
INFO "Testing SSH over vsock"
354+
limactl stop "${NAME}"
354355
set -x
355-
if ! LIMA_SSH_OVER_VSOCK=false limactl restart "${NAME}" 2>&1 | grep -iq "skipping detection of SSH server on vsock port"; then
356+
if ! LIMA_SSH_OVER_VSOCK=false limactl start "${NAME}" 2>&1 | grep -iq "skipping detection of SSH server on vsock port"; then
356357
set +x
357358
diagnose "${NAME}"
358359
ERROR "LIMA_SSH_OVER_VSOCK=false did not disable vsock forwarder"
359360
exit 1
360361
fi
361-
if ! LIMA_SSH_OVER_VSOCK=true limactl restart "${NAME}" 2>&1 | grep -iq "started vsock forwarder"; then
362+
limactl stop "${NAME}"
363+
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -iq "started vsock forwarder"; then
362364
set +x
363365
diagnose "${NAME}"
364366
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
365367
exit 1
366368
fi
367-
if ! LIMA_SSH_OVER_VSOCK="" limactl restart "${NAME}" 2>&1 | grep -iq "started vsock forwarder"; then
369+
limactl stop "${NAME}"
370+
if ! LIMA_SSH_OVER_VSOCK="" limactl start "${NAME}" 2>&1 | grep -iq "started vsock forwarder"; then
368371
set +x
369372
diagnose "${NAME}"
370373
ERROR "LIMA_SSH_OVER_VSOCK= did not enable vsock forwarder"

0 commit comments

Comments
 (0)