From 892d9089a88abaa2ef1127f16308d03f4f08a4ce Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 31 Mar 2017 22:13:50 +0200 Subject: tests: Introduce 'simple-operating-system' and use it. * gnu/tests.scm (%simple-os): New macro. (simple-operating-system): New macro. * gnu/tests/base.scm (%simple-os): Define using 'simple-operating-system'. (%mcron-os): Use 'simple-operating-system'. * gnu/tests/mail.scm (%opensmtpd-os): Likewise. * gnu/tests/messaging.scm (%base-os, os-with-service): Remove. (run-xmpp-test): Use 'simple-operating-system'. * gnu/tests/networking.scm (%inetd-os): Likewise. * gnu/tests/ssh.scm (%base-os, os-with-service): Remove. (run-ssh-test): Use 'simple-operating-system'. * gnu/tests/web.scm (%nginx-os): Likewise. --- gnu/tests/mail.scm | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'gnu/tests/mail.scm') diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm index 47328a54ae..d5c08b7f09 100644 --- a/gnu/tests/mail.scm +++ b/gnu/tests/mail.scm @@ -19,11 +19,8 @@ (define-module (gnu tests mail) #:use-module (gnu tests) #:use-module (gnu system) - #:use-module (gnu system file-systems) - #:use-module (gnu system grub) #:use-module (gnu system vm) #:use-module (gnu services) - #:use-module (gnu services base) #:use-module (gnu services mail) #:use-module (gnu services networking) #:use-module (guix gexp) @@ -32,23 +29,15 @@ (define-module (gnu tests mail) #:export (%test-opensmtpd)) (define %opensmtpd-os - (operating-system - (host-name "komputilo") - (timezone "Europe/Berlin") - (locale "en_US.UTF-8") - (bootloader (grub-configuration (device #f))) - (file-systems %base-file-systems) - (firmware '()) - (services (cons* - (dhcp-client-service) - (service opensmtpd-service-type - (opensmtpd-configuration - (config-file - (plain-file "smtpd.conf" " + (simple-operating-system + (dhcp-client-service) + (service opensmtpd-service-type + (opensmtpd-configuration + (config-file + (plain-file "smtpd.conf" " listen on 0.0.0.0 accept from any for local deliver to mbox -")))) - %base-services)))) +")))))) (define (run-opensmtpd-test) "Return a test of an OS running OpenSMTPD service." -- cgit v1.2.3