mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
services: Add 'lookup-service-types'.
* gnu/services.scm (lookup-service-types): New procedure. * tests/services.scm ("lookup-service-types"): New test.
This commit is contained in:
parent
3943913fac
commit
49483f7138
2 changed files with 20 additions and 1 deletions
|
@ -23,7 +23,8 @@
|
|||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (srfi srfi-34)
|
||||
#:use-module (srfi srfi-64))
|
||||
#:use-module (srfi srfi-64)
|
||||
#:use-module (ice-9 match))
|
||||
|
||||
(define live-service
|
||||
(@@ (gnu services herd) live-service))
|
||||
|
@ -206,4 +207,11 @@
|
|||
(list (map live-service-provision unload)
|
||||
(map shepherd-service-provision load)))))
|
||||
|
||||
(test-eq "lookup-service-types"
|
||||
system-service-type
|
||||
(and (null? (lookup-service-types 'does-not-exist-at-all))
|
||||
(match (lookup-service-types 'system)
|
||||
((one) one)
|
||||
(x x))))
|
||||
|
||||
(test-end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue