From c24b15472baaa7ec67d48cbf296bbe5ab727b78f Mon Sep 17 00:00:00 2001 From: Clément Lassieur Date: Mon, 11 Jun 2018 21:07:24 +0200 Subject: 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. --- gnu/tests/version-control.scm | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'gnu/tests/version-control.scm') diff --git a/gnu/tests/version-control.scm b/gnu/tests/version-control.scm index 8024739734..3b935a1b48 100644 --- a/gnu/tests/version-control.scm +++ b/gnu/tests/version-control.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2018 Oleg Pykhalov ;;; Copyright © 2017, 2018 Ludovic Courtès -;;; Copyright © 2017 Clément Lassieur +;;; Copyright © 2017, 2018 Clément Lassieur ;;; ;;; This file is part of GNU Guix. ;;; @@ -147,23 +147,19 @@ HTTP-PORT." marionette)) ;; Wait for nginx to be up and running. - (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)) ;; Wait for fcgiwrap to be up and running. - (test-eq "fcgiwrap running" - 'running! + (test-assert "fcgiwrap running" (marionette-eval '(begin (use-modules (gnu services herd)) - (start-service 'fcgiwrap) - 'running!) + (start-service 'fcgiwrap)) marionette)) ;; Make sure the PID file is created. @@ -272,13 +268,11 @@ HTTP-PORT." (test-begin "git-http") ;; Wait for nginx to be up and running. - (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)) ;; Make sure Git test repository is created. -- cgit v1.2.3