tests: base: Compare all the service provisions, not just canonical names.

* gnu/tests/base.scm (run-basic-test)["shepherd services"]: Use
‘append-map’ on live service provisions to match what
‘operating-system-shepherd-service-names’ does.

Change-Id: Ie54082eed6c7b8d37d3428711e71c11e80940235
This commit is contained in:
Ludovic Courtès 2024-07-18 12:26:51 +02:00
parent 0553c44471
commit a9d8ad6595
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016-2020, 2022, 2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
@ -200,14 +200,17 @@ (define marionette
(test-assert "shepherd services" (test-assert "shepherd services"
(let ((services (marionette-eval (let ((services (marionette-eval
'(begin '(begin
(use-modules (gnu services herd)) (use-modules (gnu services herd)
(srfi srfi-1))
(map (compose car live-service-provision) (append-map live-service-provision
(current-services))) (current-services)))
marionette))) marionette)))
(lset= eq? (lset= eq?
(pk 'services services) (pk 'services services)
'(root #$@(operating-system-shepherd-service-names os))))) '(root
shepherd
#$@(operating-system-shepherd-service-names os)))))
(test-equal "libc honors /etc/localtime" (test-equal "libc honors /etc/localtime"
-7200 ;CEST = GMT+2 -7200 ;CEST = GMT+2