diff options
| author | Mathieu Othacehe <othacehe@gnu.org> | 2025-11-02 19:19:02 +0100 |
|---|---|---|
| committer | Mathieu Othacehe <othacehe@gnu.org> | 2025-11-08 11:24:56 +0100 |
| commit | efb910877f6ddf415519c66a2f305c00fb070454 (patch) | |
| tree | b81159ba4dbec685e4907f2e5892035bcc74d037 | |
| parent | 9ab50a57ac414f6476295fa75563e215d4115ae2 (diff) | |
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
| -rw-r--r-- | gnu/tests/mail.scm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gnu/tests/mail.scm b/gnu/tests/mail.scm index 07a4487d785..389bb4b1569 100644 --- a/gnu/tests/mail.scm +++ b/gnu/tests/mail.scm | |||
| @@ -484,7 +484,17 @@ addheader \"X-Sieve-Filtered\" \"Guix\"; | |||
| 484 | (mail-location | 484 | (mail-location |
| 485 | (string-append "maildir:~/Maildir" | 485 | (string-append "maildir:~/Maildir" |
| 486 | ":INBOX=~/Maildir/INBOX" | 486 | ":INBOX=~/Maildir/INBOX" |
| 487 | ":LAYOUT=fs")))) | 487 | ":LAYOUT=fs")) |
| 488 | (namespaces | ||
| 489 | (list | ||
| 490 | (namespace-configuration | ||
| 491 | (name "main") | ||
| 492 | (inbox? #t) | ||
| 493 | (mailboxes | ||
| 494 | (list | ||
| 495 | (mailbox-configuration | ||
| 496 | (name "TESTBOX") | ||
| 497 | (auto "create"))))))))) | ||
| 488 | (service getmail-service-type | 498 | (service getmail-service-type |
| 489 | (list | 499 | (list |
| 490 | (getmail-configuration | 500 | (getmail-configuration |
| @@ -594,9 +604,6 @@ Subject: Hello Nice to meet you!") | |||
| 594 | (read-line imap) ;+ | 604 | (read-line imap) ;+ |
| 595 | (write-line "c2lyaGM=" imap) | 605 | (write-line "c2lyaGM=" imap) |
| 596 | (read-line imap) ;OK | 606 | (read-line imap) ;OK |
| 597 | ;; Create a TESTBOX mailbox | ||
| 598 | (write-line "a CREATE TESTBOX" imap) | ||
| 599 | (read-line imap) ;OK | ||
| 600 | ;; Append a message to a TESTBOX mailbox | 607 | ;; Append a message to a TESTBOX mailbox |
| 601 | (write-line (format #f "a APPEND TESTBOX {~a}" | 608 | (write-line (format #f "a APPEND TESTBOX {~a}" |
| 602 | (number->string (message-length message))) | 609 | (number->string (message-length message))) |
