From df660fdd529edc913b0d82132557b8e64574d034 Mon Sep 17 00:00:00 2001 From: Rodion Goritskov Date: Tue, 24 Dec 2024 22:53:34 +0100 Subject: miniflux: Fix service test --- rodion/tests/services.scm | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/rodion/tests/services.scm b/rodion/tests/services.scm index e5f7571..9b1166b 100644 --- a/rodion/tests/services.scm +++ b/rodion/tests/services.scm @@ -37,7 +37,7 @@ (service dhcp-client-service-type) (service postgresql-service-type (postgresql-configuration - (postgresql postgresql-15))) + (postgresql postgresql-13))) (service miniflux-service-type (miniflux-configuration (listen-addr "0.0.0.0:8080"))))) @@ -74,17 +74,22 @@ (test-runner-current (system-test-runner #$output)) (test-begin #$name) - (test-assert #$(string-append name " service running") - (marionette-eval - '(begin - (use-modules (gnu services herd)) - (match (start-service '#$(string->symbol name)) - (#f #f) - (('service response-parts ...) - (match (assq-ref response-parts 'running) - ((#t) #t) - ((pid) (number? pid)))))) - marionette)) + (test-assert "Check Miniflux service is running" + (begin + (#$retry-on-error + (lambda () + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (match (start-service '#$(string->symbol name)) + (#f #f) + (('service response-parts ...) + (match (assq-ref response-parts 'running) + (#f #f) + ((running) #t))))) + marionette)) + #:delay 1 + #:times 10))) (test-assert "Miniflux TCP port ready, IPv4" (wait-for-tcp-port #$forwarded-port marionette)) -- cgit v1.2.3