mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
tests: Honor the return value of 'start-service'.
Since commit dc7b3e5633
, 'start-service' returns
the Shepherd's representation of the service as a sexp, and '#f' if the
service fails to start. Also, it doesn't throw an exception when the service
fails to start, so relying on an exception instead of relying on its return
value is a false positive.
* gnu/tests/base.scm (run-nss-mdns-test): Split tests so to check the return
value of 'start-service'.
(run-mcron-test, run-nss-mdns-test): Use 'test-assert' with the return value
of 'start-service'.
* gnu/tests/admin.scm (run-tailon-test): Idem.
* gnu/tests/dict.scm (run-dicod-test): Idem.
* gnu/tests/mail.scm (run-opensmtpd-test, run-exim-test, run-dovecot-test):
Idem.
* gnu/tests/messaging.scm (run-xmpp-test, run-bitlbee-test): Idem.
* gnu/tests/nfs.scm (run-nfs-test): Idem.
* gnu/tests/rsync.scm (run-rsync-test): Idem.
* gnu/tests/ssh.scm (run-ssh-test): Idem.
* gnu/tests/version-control.scm (run-cgit-test, run-git-http-test): Idem.
* gnu/tests/web.scm (run-php-fpm-test): Idem.
This commit is contained in:
parent
14618a1ebb
commit
c24b15472b
10 changed files with 69 additions and 80 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
|
||||
;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
|
||||
;;; Copyright © 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
|
@ -102,13 +102,11 @@
|
|||
(test-begin "xmpp")
|
||||
|
||||
;; Wait for XMPP service to be up and running.
|
||||
(test-eq "service running"
|
||||
'running!
|
||||
(test-assert "service running"
|
||||
(marionette-eval
|
||||
'(begin
|
||||
(use-modules (gnu services herd))
|
||||
(start-service 'xmpp-daemon)
|
||||
'running!)
|
||||
(start-service 'xmpp-daemon))
|
||||
marionette))
|
||||
|
||||
;; Check XMPP service's PID.
|
||||
|
@ -196,13 +194,11 @@
|
|||
|
||||
(test-begin "bitlbee")
|
||||
|
||||
(test-eq "service started"
|
||||
'running!
|
||||
(test-assert "service started"
|
||||
(marionette-eval
|
||||
'(begin
|
||||
(use-modules (gnu services herd))
|
||||
(start-service 'bitlbee)
|
||||
'running!)
|
||||
(start-service 'bitlbee))
|
||||
marionette))
|
||||
|
||||
(test-equal "valid PID"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue