Skip to content

Commit 370b6c8

Browse files
authored
Merge pull request #4280 from norio-nomura/loosen-ssh-over-vsock-detection-tests
hack/test-templates.sh: Loosen SSH over VSOCK detection tests
2 parents 8a63421 + bef4ba6 commit 370b6c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hack/test-templates.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,15 +338,17 @@ if [[ -n ${CHECKS["ssh-over-vsock"]} ]]; then
338338
set -x
339339
INFO "Testing LIMA_SSH_OVER_VSOCK=true environment"
340340
limactl stop "${NAME}"
341-
if ! LIMA_SSH_OVER_VSOCK=true limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
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
342343
set +x
343344
diagnose "${NAME}"
344345
ERROR "LIMA_SSH_OVER_VSOCK=true did not enable vsock forwarder"
345346
exit 1
346347
fi
347348
INFO 'Testing LIMA_SSH_OVER_VSOCK="" environment'
348349
limactl stop "${NAME}"
349-
if ! LIMA_SSH_OVER_VSOCK="" limactl start "${NAME}" 2>&1 | grep -i "started vsock forwarder"; then
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
350352
set +x
351353
diagnose "${NAME}"
352354
ERROR "LIMA_SSH_OVER_VSOCK= did not enable vsock forwarder"

0 commit comments

Comments
 (0)