Univention Bugzilla – Bug 38727
Dovecot quota support tests
Last modified: 2023-03-25 06:43:40 CET
Test features introduced with #38474 and #38553: * user quota (LDAP univentionMailUserQuota in MB): a) quota set with UDM should be reflected by IMAP4.getquota() b) quota set with IMAP4.setquota() should be reflected by UDM c) going over mail/dovecot/quota/warning/text/PERCENT=TEXT percent of quota should trigger a warning message TEXT with subject mail/dovecot/quota/warning/subject d) user over quota should not be able to IMAP4.append() * quota-service for Postfix: new mails should be rejected during SMTP dialogue if user is over quota (until 110% is allowed) a) user under quota should receive email b) for a user over quota, Postfix should reject the mail (not bounce)
In commit 61392 two tests were added: 40_mail/40_dovecot_quota 40_mail/41_dovecot_quota-status "user quota -> b) quota set with IMAP4.setquota() should be reflected by UDM" cannot be implemented with the Dovecot configuration used in UCS. IMAP4.setquota() needs a admin-user, but that only works with a dict-quota backend, which does not support a LDAP userdb.
The test case failed: http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-3/job/Autotest%20MultiEnv/SambaVersion=s3,Systemrolle=slave/3/ *** BEGIN *** ['/usr/bin/python', '41_dovecot_quota-status'] *** *** 40_mail/41_dovecot_quota-status *** Test Dovecots quota-status service for Postfix *** *** START TIME: 2015-08-08 08:39:07 *** 41_dovecot_quota-status:70: SyntaxWarning: name 'timeout' is assigned to before global declaration global timeout Creating users/user object with {'username': 'hn1vsuic4x', 'set': {'mailHomeServer': 'slave094.autotest094.local', 'UniventionDovecotUserQuota': '2', 'mailPrimaryAddress': 'hn1vsuic4x@autotest094.local'}, 'firstname': 'uzhtid63rn', 'lastname': 'bs72y8ffzh', 'position': 'cn=users,dc=autotest094,dc=local', 'password': 'univention'} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=4454 lid=4445) CRITICAL: no change of listener transaction id for last 0 checks (nid=4454 lid=4451) OK: replication complete (nid=4454 lid=4454) Done: replication complete. *** Sending mail: recipients=['hn1vsuic4x@autotest094.local'] sender='tarpit@example.com' subject='41_dovecot_quota-status 1' idstring='no id string' gtube=False server='slave094' port=25 tls=False username=None password=None HELO/EHLO='ucstest.5512.example.com' *** Sending mail: recipients=['hn1vsuic4x@autotest094.local'] sender='tarpit@example.com' subject='41_dovecot_quota-status 2' idstring='no id string' gtube=False server='slave094' port=25 tls=False username=None password=None HELO/EHLO='ucstest.5512.example.com' Cleanup after exception: <type 'exceptions.IOError'> [Errno 2] No such file or directory: '/var/spool/dovecot/private/autotest094.local/hn1vsuic4x/Maildir/tmp/1439037575.M4097P5574.slave094' Performing UCSTestUDM cleanup... Traceback (most recent call last): File "41_dovecot_quota-status", line 72, in <module> main() File "41_dovecot_quota-status", line 65, in main if not rejected or mail_delivered("Subject: 41_dovecot_quota-status 2", mail_address=mail): File "/usr/lib/pymodules/python2.7/univention/testing/decorators.py", line 13, in __call__ UCSTestUDM cleanup done result = self.func(*args, **kwargs) File "/usr/share/ucs-test/40_mail/essential/mail.py", line 377, in mail_delivered with open(_file) as fi: IOError: [Errno 2] No such file or directory: '/var/spool/dovecot/private/autotest094.local/hn1vsuic4x/Maildir/tmp/1439037575.M4097P5574.slave094' *** END TIME: 2015-08-08 08:39:35 *** *** TEST DURATION (H:MM:SS.ms): 0:00:28.223253 *** *** END *** 1 *** Am 08.08.2015 um 15:57 schrieb Sönke Schwardt-Krummrich: > looks like a timing issue. IIRC the mail is created in ... /tmp/... and then moved to target dir (usually ... /new/...). > We should change the ucs-test lib to ignore the tmp dir while looking for the delivered mail.
I've disabled the test case: r62829 + r62830 + r62831
Commits 62875 & 62876 exclude the 'tmp' directory from searches in dovecots spool directory.
For this bug is no separate QA needed.