diff options
| author | Sughosha <sughosha@disroot.org> | 2026-02-20 00:36:49 +0530 |
|---|---|---|
| committer | Giacomo Leidi <therewasa@fishinthecalculator.me> | 2026-02-22 17:15:19 +0100 |
| commit | 4b8cfa7f6963441a77258494eee7a89371422d9e (patch) | |
| tree | 58786db73b65654d01b7da477eb259b632d4ffc6 /gnu/tests | |
| parent | f19ddd6dfe2afd312a19f12cf64a6bbb27a23d9d (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.scm | 21 |
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 @@ '(file-exists? #$(%readymedia-default-log-file)) marionette)) + ;; Pid directory and file + (test-assert "pid directory exists" + (marionette-eval + '(eq? (stat:type (stat #$%readymedia-default-pid-directory)) + 'directory) + marionette)) + (test-assert "pid directory has correct ownership" + (marionette-eval + '(let ((pid-dir (stat #$%readymedia-default-pid-directory)) + (user (getpwnam #$%readymedia-user-account))) + (and (eqv? (stat:uid pid-dir) (passwd:uid user)) + (eqv? (stat:gid pid-dir) (passwd:gid user)))) + marionette)) + (test-assert "pid directory has expected permissions" + (marionette-eval + '(eqv? (stat:perms (stat #$%readymedia-default-pid-directory)) + #o755) + marionette)) + (test-assert "containerd PID file present" + (wait-for-file #$(%readymedia-pid-file) marionette)) + ;; Service (test-assert "ReadyMedia service is running" (marionette-eval |
