From a295a1ca2942794ac52321a639128f94be595ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 21 Apr 2020 15:47:56 +0200 Subject: tests: ssh: Explicitly wait for port 22. Previously we could occasionally try to connect before the server is actually listening, both for OpenSSH and Dropbear. * gnu/tests/ssh.scm (run-ssh-test)["wait for port 22"]: New test. --- gnu/tests/ssh.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/tests/ssh.scm b/gnu/tests/ssh.scm index a74227ea4a..10438ad22a 100644 --- a/gnu/tests/ssh.scm +++ b/gnu/tests/ssh.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès +;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès ;;; Copyright © 2017, 2018 Clément Lassieur ;;; Copyright © 2017 Marius Bakke ;;; @@ -136,6 +136,9 @@ root with an empty password." (current-services)))) marionette)) + (test-assert "wait for port 22" + (wait-for-tcp-port 22 marionette)) + ;; Connect to the guest over SSH. Make sure we can run a shell ;; command there. (test-equal "shell command" -- cgit v1.2.3