summaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorSughosha <sughosha@disroot.org>2026-02-20 00:36:49 +0530
committerGiacomo Leidi <therewasa@fishinthecalculator.me>2026-02-22 17:15:19 +0100
commit4b8cfa7f6963441a77258494eee7a89371422d9e (patch)
tree58786db73b65654d01b7da477eb259b632d4ffc6 /gnu/tests
parentf19ddd6dfe2afd312a19f12cf64a6bbb27a23d9d (diff)
services: readymedia: Run with a pid file.
* gnu/services/upnp.scm (%readymedia-default-pid-directory): New variable. (%readymedia-pid-file): New procedure. (readymedia-shepherd-service)[start]: Start with the pid file. (readymedia-activation): Create the pid directory. * gnu/tests/upnp.scm (run-readymedia-test): Test the pid directory and file. Merges: https://codeberg.org/guix/guix/pulls/1007 Change-Id: I454a89d25afe0e9bb0414645b1e4594afdf89058 Signed-off-by: Giacomo Leidi <therewasa@fishinthecalculator.me>
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/upnp.scm21
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/tests/upnp.scm b/gnu/tests/upnp.scm
index 547351b4463..226aa2ae0e9 100644
--- a/gnu/tests/upnp.scm
+++ b/gnu/tests/upnp.scm
@@ -99,6 +99,27 @@
99 '(file-exists? #$(%readymedia-default-log-file)) 99 '(file-exists? #$(%readymedia-default-log-file))
100 marionette)) 100 marionette))
101 101
102 ;; Pid directory and file
103 (test-assert "pid directory exists"
104 (marionette-eval
105 '(eq? (stat:type (stat #$%readymedia-default-pid-directory))
106 'directory)
107 marionette))
108 (test-assert "pid directory has correct ownership"
109 (marionette-eval
110 '(let ((pid-dir (stat #$%readymedia-default-pid-directory))
111 (user (getpwnam #$%readymedia-user-account)))
112 (and (eqv? (stat:uid pid-dir) (passwd:uid user))
113 (eqv? (stat:gid pid-dir) (passwd:gid user))))
114 marionette))
115 (test-assert "pid directory has expected permissions"
116 (marionette-eval
117 '(eqv? (stat:perms (stat #$%readymedia-default-pid-directory))
118 #o755)
119 marionette))
120 (test-assert "containerd PID file present"
121 (wait-for-file #$(%readymedia-pid-file) marionette))
122
102 ;; Service 123 ;; Service
103 (test-assert "ReadyMedia service is running" 124 (test-assert "ReadyMedia service is running"
104 (marionette-eval 125 (marionette-eval