Skip to content

Commit 83293f4

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 256b23a commit 83293f4

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
@@ -347,28 +347,20 @@ if [[ -n ${CHECKS["ssh-over-vsock"]} ]]; then
347347
if [[ "$(limactl ls "${NAME}" --yq .vmType)" == "vz" ]]; then
348348
INFO "Testing SSH over vsock"
349349
set -x
350-
INFO "Testing LIMA_SSH_OVER_VSOCK=true environment"
351-
limactl stop "${NAME}"
352-
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
353-
set +x
354-
diagnose "${NAME}"
355-
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
356-
exit 1
357-
fi
358-
INFO 'Testing LIMA_SSH_OVER_VSOCK="" environment'
350+
INFO "Testing LIMA_SSH_OVER_VSOCK=false environment"
359351
limactl stop "${NAME}"
360-
if ! LIMA_SSH_OVER_VSOCK="" limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
352+
if ! LIMA_SSH_OVER_VSOCK=false limactl start "${NAME}" 2>&1 | grep -i "skipping detection of SSH server on vsock port"; then
361353
set +x
362354
diagnose "${NAME}"
363-
ERROR "LIMA_SSH_OVER_VSOCK= did not enable vsock forwarder"
355+
ERROR "LIMA_SSH_OVER_VSOCK=false did not disable vsock forwarder"
364356
exit 1
365357
fi
366-
INFO "Testing LIMA_SSH_OVER_VSOCK=false environment"
358+
INFO "Testing LIMA_SSH_OVER_VSOCK=true environment"
367359
limactl stop "${NAME}"
368-
if ! LIMA_SSH_OVER_VSOCK=false limactl start "${NAME}" 2>&1 | grep -i "skipping detection of SSH server on vsock port"; then
360+
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
369361
set +x
370362
diagnose "${NAME}"
371-
ERROR "LIMA_SSH_OVER_VSOCK=false did not disable vsock forwarder"
363+
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
372364
exit 1
373365
fi
374366
set +x

0 commit comments

Comments
 (0)