guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/07: tests: opensmtpd: Check /var/spool/mail instead of /var/mail.


From: guix-commits
Subject: 05/07: tests: opensmtpd: Check /var/spool/mail instead of /var/mail.
Date: Mon, 16 Mar 2020 09:06:03 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit a37e03d60e18dfcf119d0b92d9008e54fc350bf1
Author: Ludovic Courtès <address@hidden>
AuthorDate: Mon Mar 16 12:21:05 2020 +0100

    tests: opensmtpd: Check /var/spool/mail instead of /var/mail.
    
    The test had been failing since the upgrade to 6.6.3p1 in commit
    2dbfd8eec43b602d23cee3fdd2842cc333e36c24.
    
    * gnu/services/mail.scm (opensmtpd-activation): Create /var/spool/mail.
    * gnu/tests/mail.scm (run-opensmtpd-test): Check /var/spool/mail instead
    of /var/mail.
---
 gnu/services/mail.scm | 4 +++-
 gnu/tests/mail.scm    | 6 +++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index d973165..7791780 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -1670,7 +1670,9 @@ match from local for any action outbound
            ;; Create mbox and spool directories.
            (mkdir-p "/var/mail")
            (mkdir-p "/var/spool/smtpd")
-           (chmod "/var/spool/smtpd" #o711))))))
+           (chmod "/var/spool/smtpd" #o711)
+           (mkdir-p "/var/spool/mail")
+           (chmod "/var/spool/mail" #o711))))))
 
 (define %opensmtpd-pam-services
   (list (unix-pam-service "smtpd")))
diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm
index 58172cd..a50fb1d 100644
--- a/gnu/tests/mail.scm
+++ b/gnu/tests/mail.scm
@@ -99,8 +99,8 @@ match from any for local action inbound
 
           (test-assert "mbox is empty"
             (marionette-eval
-             '(and (file-exists? "/var/mail")
-                   (not (file-exists? "/var/mail/root")))
+             '(and (file-exists? "/var/spool/mail")
+                   (not (file-exists? "/var/spool/mail/root")))
              marionette))
 
           (test-eq "accept an email"
@@ -150,7 +150,7 @@ match from any for local action inbound
 
                 (let wait ((n 20))
                   (cond ((queue-empty?)
-                         (file-exists? "/var/mail/root"))
+                         (file-exists? "/var/spool/mail/root"))
                         ((zero? n)
                          (error "root mailbox didn't show up"))
                         (else



reply via email to

[Prev in Thread] Current Thread [Next in Thread]