diff options
author | Clément Lassieur <clement@lassieur.org> | 2018-06-11 21:07:24 +0200 |
---|---|---|
committer | Clément Lassieur <clement@lassieur.org> | 2018-06-13 09:11:45 +0200 |
commit | c24b15472baaa7ec67d48cbf296bbe5ab727b78f (patch) | |
tree | b38470167d03a42d981e82a748d530cd1c4128b0 /gnu/tests/web.scm | |
parent | 14618a1ebb8060b163acd1615c828aa2c62d0651 (diff) | |
download | patches-c24b15472baaa7ec67d48cbf296bbe5ab727b78f.tar patches-c24b15472baaa7ec67d48cbf296bbe5ab727b78f.tar.gz |
tests: Honor the return value of 'start-service'.
Since commit dc7b3e56337ee9d8dcd8fe7d5cab71ef536d024f, '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.
Diffstat (limited to 'gnu/tests/web.scm')
-rw-r--r-- | gnu/tests/web.scm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm index a6bf6efcfe..73d502dd0e 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net> -;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org> +;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr> ;;; ;;; This file is part of GNU Guix. @@ -245,13 +245,11 @@ HTTP-PORT, along with php-fpm." ((pid) (number? pid)))))) marionette)) - (test-eq "nginx running" - 'running! + (test-assert "nginx running" (marionette-eval '(begin (use-modules (gnu services herd)) - (start-service 'nginx) - 'running!) + (start-service 'nginx)) marionette)) (test-equal "http-get" |