Skip to content

Commit e6a7f6a

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> # Conflicts: # hack/test-templates.sh
1 parent 097efc6 commit e6a7f6a

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

hack/test-templates.sh

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -336,30 +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-
# Detection of the SSH server on VSOCK may fail; however, a failing log indicates that controlling detection via the environment variable works as expected.
342-
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -i -E "(started vsock forwarder|Failed to detect SSH server on vsock)"; then
343-
set +x
344-
diagnose "${NAME}"
345-
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
346-
exit 1
347-
fi
348-
INFO 'Testing LIMA_SSH_OVER_VSOCK="" environment'
339+
INFO "Testing LIMA_SSH_OVER_VSOCK=false environment"
349340
limactl stop "${NAME}"
350-
# Detection of the SSH server on VSOCK may fail; however, a failing log indicates that controlling detection via the environment variable works as expected.
351-
if ! LIMA_SSH_OVER_VSOCK="" limactl start "${NAME}" 2>&1 | grep -i -E "(started vsock forwarder|Failed to detect SSH server on vsock)"; then
341+
if ! LIMA_SSH_OVER_VSOCK=false limactl start "${NAME}" 2>&1 | grep -i "skipping detection of SSH server on vsock port"; then
352342
set +x
353343
diagnose "${NAME}"
354-
ERROR "LIMA_SSH_OVER_VSOCK= did not enable vsock forwarder"
344+
ERROR "LIMA_SSH_OVER_VSOCK=false did not disable vsock forwarder"
355345
exit 1
356346
fi
357-
INFO "Testing LIMA_SSH_OVER_VSOCK=false environment"
347+
INFO "Testing LIMA_SSH_OVER_VSOCK=true environment"
358348
limactl stop "${NAME}"
359-
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 -E "(started vsock forwarder|Failed to detect SSH server on vsock)"; then
360350
set +x
361351
diagnose "${NAME}"
362-
ERROR "LIMA_SSH_OVER_VSOCK=false did not disable vsock forwarder"
352+
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
363353
exit 1
364354
fi
365355
set +x

0 commit comments

Comments
 (0)