branch: main commit 6daef9c2ecbb738c413ffa39493ef5d38e5f1881 Author: Ludovic Courtès <l...@gnu.org> AuthorDate: Tue Sep 3 14:31:14 2024 +0200
tests: No longer require Avahi. This is unnecessary and could lead to confusion or a ‘cuirass remote-server’ startup failure if another instance was running on the same machine. * tests/remote.scm (start-server): Pass “--no-publish”. (avahi-daemon-running?): Remove, and remove its use. --- tests/remote.scm | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/tests/remote.scm b/tests/remote.scm index 3584b56..c836f32 100644 --- a/tests/remote.scm +++ b/tests/remote.scm @@ -34,8 +34,6 @@ ((guix store) #:hide (build)) ((guix utils) #:select (%current-system)) (tests common) - (avahi) - (avahi client) (squee) (simple-zmq) ((zlib) #:select (call-with-gzip-input-port)) @@ -59,7 +57,7 @@ (setenv "CUIRASS_LOGGING_LEVEL" "debug") (worker (spawn "cuirass" '("cuirass" "remote-worker" - "--server=127.0.0.1:5555" + "--server=127.0.0.1:5555" ;no Avahi discovery "--private-key=tests/signing-key.sec" "--public-key=tests/signing-key.pub") #:search-path? #t))) @@ -75,6 +73,7 @@ (server (spawn "cuirass" (list "cuirass" "remote-server" (string-append "--database=" (%package-database)) + "--no-publish" ;disable Avahi support "--cache=tests/cache" "--private-key=tests/signing-key.sec" "--public-key=tests/signing-key.pub") @@ -134,21 +133,7 @@ "Return true if guix-daemon is running." (force result)))) -(define avahi-daemon-running? - (let ((result (delay - (catch 'avahi-error - (lambda () - (let* ((poll (make-simple-poll)) - (client (make-client (simple-poll poll) - (list - client-flag/ignore-user-config) - (const #t)))) - (client? client))) - (const #f))))) - (lambda () - "Return true if avahi-daemon is running." - (force result)))) - + (test-group-with-cleanup "remote" (test-assert "db-init" (begin @@ -156,7 +141,7 @@ #t)) ;; The remaining tests require guix-daemon to be running. - (test-skip (if (and (guix-daemon-running?) (avahi-daemon-running?)) 0 100)) + (test-skip (if (guix-daemon-running?) 0 100)) (test-assert "fill-db" (let ((spec