Skip to content

Commit 377a259

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 7650346 commit 377a259

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
@@ -348,28 +348,20 @@ if [[ -n ${CHECKS["ssh-over-vsock"]} ]]; then
348348
if [[ "$(limactl ls "${NAME}" --yq .vmType)" == "vz" ]]; then
349349
INFO "Testing SSH over vsock"
350350
set -x
351-
INFO "Testing LIMA_SSH_OVER_VSOCK=true environment"
352-
limactl stop "${NAME}"
353-
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
354-
set +x
355-
diagnose "${NAME}"
356-
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
357-
exit 1
358-
fi
359-
INFO 'Testing LIMA_SSH_OVER_VSOCK="" environment'
351+
INFO "Testing LIMA_SSH_OVER_VSOCK=false environment"
360352
limactl stop "${NAME}"
361-
if ! LIMA_SSH_OVER_VSOCK="" limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
353+
if ! LIMA_SSH_OVER_VSOCK=false limactl start "${NAME}" 2>&1 | grep -i "skipping detection of SSH server on vsock port"; then
362354
set +x
363355
diagnose "${NAME}"
364-
ERROR "LIMA_SSH_OVER_VSOCK= did not enable vsock forwarder"
356+
ERROR "LIMA_SSH_OVER_VSOCK=false did not disable vsock forwarder"
365357
exit 1
366358
fi
367-
INFO "Testing LIMA_SSH_OVER_VSOCK=false environment"
359+
INFO "Testing LIMA_SSH_OVER_VSOCK=true environment"
368360
limactl stop "${NAME}"
369-
if ! LIMA_SSH_OVER_VSOCK=false limactl start "${NAME}" 2>&1 | grep -i "skipping detection of SSH server on vsock port"; then
361+
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
370362
set +x
371363
diagnose "${NAME}"
372-
ERROR "LIMA_SSH_OVER_VSOCK=false did not disable vsock forwarder"
364+
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
373365
exit 1
374366
fi
375367
set +x

0 commit comments

Comments
 (0)