diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2024-12-09 22:41:29 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2024-12-09 23:15:44 +0100 |
| commit | e7cd328714be93ed6a931c9110b52adc7b439752 (patch) | |
| tree | e8a58013422bc21624816e9063c0a7333810e97a /gnu/tests/ssh.scm | |
| parent | 51ee3a727877500ad426e2c37a990df15d1283f5 (diff) | |
tests: Adjust for new return value of ‘start-service’.
In Shepherd 1.0, the “running value” of processes is no longer a plain
integer; instead, it is a (process …) sexp. This commit adjusts tests
to this change in a way that works both for 1.0 and for previous
versions.
* gnu/tests/databases.scm (run-memcached-test)
(run-mysql-test): Don’t expect PID to be a number.
* gnu/tests/docker.scm (run-docker-test)
(run-docker-system-test, run-oci-container-test): Likewise.
* gnu/tests/guix.scm (run-guix-build-coordinator-test)
(run-guix-data-service-test, run-nar-herder-test)
(run-bffe-test): Likewise.
* gnu/tests/ldap.scm (run-ldap-test): Likewise.
* gnu/tests/monitoring.scm (run-prometheus-node-exporter-server-test):
Likewise.
* gnu/tests/virtualization.scm (run-libvirt-test)
(run-qemu-guest-agent-test, run-childhurd-test): Likewise.
* gnu/tests/web.scm (run-webserver-test, run-php-fpm-test)
(run-hpcguix-web-server-test, run-patchwork-test)
(run-agate-test): Likewise
* gnu/tests/ssh.scm (run-ssh-test): Accept a number, an ‘inetd-service’
sexp, or a ‘process’ sexp.
Change-Id: I8c7a37a981f0788780fbc33752a38e7f9a026437
Diffstat (limited to 'gnu/tests/ssh.scm')
| -rw-r--r-- | gnu/tests/ssh.scm | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gnu/tests/ssh.scm b/gnu/tests/ssh.scm index 3f550db5eac..4882c7a88b1 100644 --- a/gnu/tests/ssh.scm +++ b/gnu/tests/ssh.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016-2022 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2016-2022, 2024 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> ;;; @@ -124,13 +124,22 @@ root with an empty password." (let ((pid (marionette-eval '(begin (use-modules (gnu services herd) - (srfi srfi-1)) + (srfi srfi-1) + (ice-9 match)) - (live-service-running - (find (lambda (live) - (memq 'ssh-daemon - (live-service-provision live))) - (current-services)))) + (match (live-service-running + (find (lambda (live) + (memq 'ssh-daemon + (live-service-provision live))) + (current-services))) + ((? number? pid) + ;; shepherd < 1.0.0 + pid) + (('inetd-service _ ...) + #t) + (('process ('version 0 _ ...) + ('id pid) _ ...) + pid))) marionette))) (if #$pid-file (= pid (wait-for-file #$pid-file marionette)) |
