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
This commit is contained in:
Mathieu Othacehe 2025-11-02 19:19:02 +01:00
parent 9ab50a57ac
commit efb910877f
No known key found for this signature in database
GPG key ID: 8354763531769CA6

View file

@ -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)))