[Dovecot] imaptest update
Timo Sirainen
tss at iki.fi
Thu Feb 28 08:56:58 EET 2008
I've finally added support for "normal" command/reply tests for my
imaptest program (http://imapwiki.org/ImapTest).
My plan is that imaptest will include some generic IMAP compliancy tests
and Dovecot will include some more strict Dovecot-specific checks. "make
dist" will run all these tests before building a tarball, so in future I
shouldn't be able to release horribly broken versions. :)
I haven't yet had time to implement all the features that I'd like (e.g.
unordered list handling needs support), but I think the current features
will allow testing quite a lot already.
http://imapwiki.org/ImapTest/Tests explains how it works.
There are currently two files: the actual test file and *.mbox file
where the mails are appended from to the test mailbox. I'm going to also
add *.conf file which allows specifying specific dovecot.conf settings.
This way I can test all these different namespace (etc.) variations as
well.
A couple of examples to show what's possible:
# Check that EXAMINE and STATUS return same UIDVALIDITY
examine $mailbox
* ok [uidvalidity $uidvalidity]
ok [read-only]
ok status $mailbox (uidvalidity)
* status $mailbox (uidvalidity $uidvalidity)
# Test EXPUNGE handling with 2 connections:
connections: 2
1 ok fetch * uid
* $seq fetch (uid $uid)
1 ok store $seq flags \deleted
* $seq fetch (flags (\deleted \recent))
1 ok expunge
* $seq expunge
2 ok fetch $seq uid
* $seq fetch (uid $uid)
2 ok noop
* $seq expunge
# LIST testing:
state: auth
ok list "" ""
* list (\noselect) $sep ""
# "" means that delete can return anything
# (although restricting it to "ok" or "no" would be better)
delete $mailbox${sep}test
""
delete $mailbox${sep}test2
""
ok create $mailbox${sep}test
ok create $mailbox${sep}test2
ok list "" $mailbox$sep%
* list (\hasnochildren) $sep $mailbox${sep}test
* list (\hasnochildren) $sep $mailbox${sep}test2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080228/f08447ee/attachment.bin
More information about the dovecot
mailing list