Skip to content

Commit 4e18558

Browse files
committed
hack/test-templates.sh: Change order of LIMA_SSH_OVER_VSOCK tests
To following tests will be run with enabled. Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
1 parent f8662f0 commit 4e18558

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

hack/test-templates.sh

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -336,28 +336,20 @@ if [[ -n ${CHECKS["ssh-over-vsock"]} ]]; then
336336
if [[ "$(limactl ls "${NAME}" --yq .vmType)" == "vz" ]]; then
337337
INFO "Testing SSH over vsock"
338338
set -x
339-
INFO "Testing LIMA_SSH_OVER_VSOCK=true environment"
340-
limactl stop "${NAME}"
341-
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
342-
set +x
343-
diagnose "${NAME}"
344-
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
345-
exit 1
346-
fi
347-
INFO 'Testing LIMA_SSH_OVER_VSOCK="" environment'
339+
INFO "Testing LIMA_SSH_OVER_VSOCK=false environment"
348340
limactl stop "${NAME}"
349-
if ! LIMA_SSH_OVER_VSOCK="" limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
341+
if ! LIMA_SSH_OVER_VSOCK=false limactl start "${NAME}" 2>&1 | grep -i "skipping detection of SSH server on vsock port"; then
350342
set +x
351343
diagnose "${NAME}"
352-
ERROR "LIMA_SSH_OVER_VSOCK= did not enable vsock forwarder"
344+
ERROR "LIMA_SSH_OVER_VSOCK=false did not disable vsock forwarder"
353345
exit 1
354346
fi
355-
INFO "Testing LIMA_SSH_OVER_VSOCK=false environment"
347+
INFO "Testing LIMA_SSH_OVER_VSOCK=true environment"
356348
limactl stop "${NAME}"
357-
if ! LIMA_SSH_OVER_VSOCK=false limactl start "${NAME}" 2>&1 | grep -i "skipping detection of SSH server on vsock port"; then
349+
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
358350
set +x
359351
diagnose "${NAME}"
360-
ERROR "LIMA_SSH_OVER_VSOCK=false did not disable vsock forwarder"
352+
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
361353
exit 1
362354
fi
363355
set +x

0 commit comments

Comments
 (0)