Subject: [PATCH v3 6/8] tests: guix-daemon: Wait for the ‘guix-daemon’ service to be up.

From: Ludovic Courtès <[email-masked]>
Date: Fri, 18 Apr 2025 21:46:51 +0200

* gnu/tests/base.scm (run-guix-daemon-test): Add “guix-daemon service is
up” test.

Change-Id: I4d44a1248599fec45c854c285d4da201c30eb00c
---
 gnu/tests/base.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 0f7fb543a7..83e047f7e6 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -1157,6 +1157,13 @@ (define (run-guix-daemon-test os)
           (test-runner-current (system-test-runner #$output))
           (test-begin "guix-daemon")
 
+          (test-assert "guix-service is running"
+            ;; Wait for 'guix-daemon' to be up.
+            (marionette-eval '(begin
+                                (use-modules (gnu services herd))
+                                (start-service 'guix-daemon))
+                             marionette))
+
           #$(guix-daemon-test-cases #~marionette)
 
           (test-end))))
-- 
2.49.0