mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
services: Test 'shepherd-service-upgrade' with transient services.
This is a followup to eeb8ac43c8
.
* tests/services.scm ("shepherd-service-upgrade: transient service"):
New test.
This commit is contained in:
parent
e25eca35ff
commit
ec6a585ee2
1 changed files with 17 additions and 0 deletions
|
@ -260,6 +260,23 @@ (define-module (test-services)
|
|||
(list (map live-service-provision unload)
|
||||
(map shepherd-service-provision restart)))))
|
||||
|
||||
(test-equal "shepherd-service-upgrade: transient service"
|
||||
;; Transient service must not be unloaded:
|
||||
;; <https://issues.guix.gnu.org/54812>.
|
||||
'(((foo)) ;unload
|
||||
((qux))) ;restart
|
||||
(call-with-values
|
||||
(lambda ()
|
||||
(shepherd-service-upgrade
|
||||
(list (live-service '(sshd-42) '() #t 42) ;transient
|
||||
(live-service '(foo) '() #f #t) ;obsolete
|
||||
(live-service '(qux) '() #f #t)) ;running
|
||||
(list (shepherd-service (provision '(qux))
|
||||
(start #t)))))
|
||||
(lambda (unload restart)
|
||||
(list (map live-service-provision unload)
|
||||
(map shepherd-service-provision restart)))))
|
||||
|
||||
(test-eq "lookup-service-types"
|
||||
system-service-type
|
||||
(and (null? (lookup-service-types 'does-not-exist-at-all))
|
||||
|
|
Loading…
Reference in a new issue