mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 13:28:12 -05:00
tests: cuirass: Restore "cuirass running".
This is a follow-up of ab054868af
. The test was
failing because the Shepherd control socket wasn't ready yet. Restore it but
make sure that the control socket is available first.
* gnu/tests/cuirass.scm ("shepherd socket ready"): New test.
("cuirass running"): Restore it.
This commit is contained in:
parent
ab054868af
commit
0de0074844
1 changed files with 26 additions and 0 deletions
|
@ -191,6 +191,32 @@ (define* (retry f #:key times delay)
|
|||
|
||||
(test-begin "cuirass")
|
||||
|
||||
;; XXX: Shepherd reads the config file *before* binding its
|
||||
;; control socket, so /var/run/shepherd/socket might not exist yet
|
||||
;; when the 'marionette' service is started.
|
||||
(test-assert "shepherd socket ready"
|
||||
(marionette-eval
|
||||
`(begin
|
||||
(use-modules (gnu services herd))
|
||||
(let loop ((i 10))
|
||||
(cond ((file-exists? (%shepherd-socket-file))
|
||||
#t)
|
||||
((> i 0)
|
||||
(sleep 1)
|
||||
(loop (- i 1)))
|
||||
(else
|
||||
'failure))))
|
||||
marionette))
|
||||
|
||||
;; Wait for cuirass to be up and running.
|
||||
(test-assert "cuirass running"
|
||||
(marionette-eval
|
||||
'(begin
|
||||
(use-modules (gnu services herd))
|
||||
(start-service 'cuirass)
|
||||
#t)
|
||||
marionette))
|
||||
|
||||
(test-assert "cuirass-web running"
|
||||
(begin
|
||||
(wait-for-tcp-port #$cuirass-web-port marionette)
|
||||
|
|
Loading…
Reference in a new issue