~ruther/guix-local

efb910877f6ddf415519c66a2f305c00fb070454 — Mathieu Othacehe 6 months ago 9ab50a5
gnu: tests: Fix getmail.

When Shepherd starts the getmail service, the TESTBOX mailbox needs to be
present, otherwise getmail fails with:

Copyright (C) 1998-2023 Charles Cazabon and others. Licensed under GNU GPL version 2.
SimpleIMAPRetriever:alice@localhost:143:
  mailbox b'TESTBOX' not selectable (TESTBOX) - verify the mailbox exists and you have sufficient permissions
  0 messages (0 bytes) retrieved, 0 skipped from SimpleIMAPRetriever:alice@localhost:143

* gnu/tests/mail.scm (run-getmail-test): Move the TESTBOX creation from here ...
(%getmail-os): ... to the dovecot configuration.

Change-Id: Ic6348565629c69e8b7bccf7c61460ca96850e6bd
1 files changed, 11 insertions(+), 4 deletions(-)

M gnu/tests/mail.scm
M gnu/tests/mail.scm => gnu/tests/mail.scm +11 -4
@@ 484,7 484,17 @@ addheader \"X-Sieve-Filtered\" \"Guix\";
                               (mail-location
                                (string-append "maildir:~/Maildir"
                                               ":INBOX=~/Maildir/INBOX"
                                               ":LAYOUT=fs"))))
                                               ":LAYOUT=fs"))
                               (namespaces
                                (list
                                 (namespace-configuration
                                   (name "main")
                                   (inbox? #t)
                                   (mailboxes
                                    (list
                                     (mailbox-configuration
                                       (name "TESTBOX")
                                       (auto "create")))))))))
                     (service getmail-service-type
                              (list
                               (getmail-configuration


@@ 594,9 604,6 @@ Subject: Hello Nice to meet you!")
              (read-line imap) ;+
              (write-line "c2lyaGM=" imap)
              (read-line imap) ;OK
              ;; Create a TESTBOX mailbox
              (write-line "a CREATE TESTBOX" imap)
              (read-line imap) ;OK
              ;; Append a message to a TESTBOX mailbox
              (write-line (format #f "a APPEND TESTBOX {~a}"
                                  (number->string (message-length message)))