Univention Bugzilla – Bug 38792
Test shared IMAP folder feature with Dovecot
Last modified: 2016-10-05 20:19:43 CEST
Create some test scripts for shared folders. +++ This bug was initially created as a clone of Bug #38471 +++ Users can read and write from/to the same folder. Use namespace, not symlinks.
Added 3 test scripts: - 43_dovecot_shared_folder_create_and_delete creates shared folder with and without primary mail address and removes them afterwards with different settings of mail/dovecot/mailbox/delete - 43_dovecot_shared_folder_change_primary_mailaddress creates a shared folder with primary mail address and changes the mail address with all possible combinations of mail/dovecot/mailbox/delete and mail/dovecot/mailbox/rename - 43_dovecot_shared_folder_add_remove_mail_primary_address creates a shared folder without primary mail address, adds a mail address and removes it afterwards Tests missing: - quota for shared folders - are mails kept during renaming/moving between shared and public namespace?
The test cases 40_mail/43_dovecot_shared_folder_add_remove_mail_primary_address, 40_mail/43_dovecot_shared_folder_change_primary_mailaddress and 40_mail/43_dovecot_shared_folder_create_and_deletefailed. I've disabled the tests now: http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-3/job/Autotest%20MultiEnv/lastCompletedBuild/SambaVersion=s4,Systemrolle=master/testReport/40_mail/43_dovecot_shared_folder_add_remove_mail_primary_address/test/ http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-3/job/Autotest%20MultiEnv/lastCompletedBuild/SambaVersion=s4,Systemrolle=master/testReport/40_mail/43_dovecot_shared_folder_change_primary_mailaddress/test/ http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-3/job/Autotest%20MultiEnv/lastCompletedBuild/SambaVersion=s4,Systemrolle=master/testReport/40_mail/43_dovecot_shared_folder_create_and_delete/test/ *** BEGIN *** ['/usr/bin/python', '43_dovecot_shared_folder_add_remove_mail_primary_address'] *** *** 40_mail/43_dovecot_shared_folder_add_remove_mail_primary_address *** Add and remove mail primary address from shared folders *** *** START TIME: 2015-08-08 17:55:45 *** Creating users/user object with {'username': 'w4asluzrdm', 'set': {'mailHomeServer': 'master091.AutoTest091.local', 'mailPrimaryAddress': 'qrzq9s4xjd@AutoTest091.local'}, 'firstname': 'vs9yfs970b', 'lastname': 'px5a0l93hg', 'position': 'cn=users,dc=AutoTest091,dc=local', 'password': 'univention'} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8352 lid=8344) CRITICAL: no change of listener transaction id for last 0 checks (nid=8352 lid=8344) CRITICAL: no change of listener transaction id for last 0 checks (nid=8352 lid=8344) CRITICAL: no change of listener transaction id for last 0 checks (nid=8352 lid=8344) CRITICAL: no change of listener transaction id for last 0 checks (nid=8352 lid=8344) OK: replication complete (nid=8352 lid=8352) Done: replication complete. WARNING: No path in service IPC$ - making it unavailable! NOTE: Service IPC$ is flagged unavailable. Waiting for DRS replication, filter: 'cn=w4asluzrdm' . . . DRS replication took 3 seconds Create mail/dovecot/mailbox/rename Create mail/dovecot/mailbox/delete File: /usr/sbin/univention-sa-learn Multifile: /etc/postfix/ldap.sharedfolderlocal Restarting univention-directory-listener daemon. ok: run: univention-directory-listener: (pid 25392) 0s, normally down done. Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8355 lid=8352) CRITICAL: no change of listener transaction id for last 0 checks (nid=8355 lid=8352) OK: replication complete (nid=8355 lid=8355) Done: replication complete. Creating mail/folder object with {'position': 'cn=folder,cn=mail,dc=AutoTest091,dc=local', 'set': {'mailHomeServer': 'master091.AutoTest091.local', 'mailDomain': 'AutoTest091.local', 'name': 'u45glh64mo', 'mailPrimaryAddress': ''}, 'append': {'sharedFolderUserACL': ['"qrzq9s4xjd@AutoTest091.local" "all"'], 'sharedFolderGroupACL': []}} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8356 lid=8355) CRITICAL: no change of listener transaction id for last 0 checks (nid=8356 lid=8355) OK: replication complete (nid=8356 lid=8356) Done: replication complete. Modifying mail/folder object with {'dn': 'cn=u45glh64mo@AutoTest091.local,cn=folder,cn=mail,dc=AutoTest091,dc=local', 'set': {'mailPrimaryAddress': 'p1t1i25vcl@AutoTest091.local'}} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8359 lid=8357) OK: replication complete (nid=8359 lid=8359) Done: replication complete. ### FAIL ### Test 0 (flag_rename=True): maildir '/var/spool/dovecot/private/autotest091.local/p1t1i25vcl/Maildir' for shared folder has not been created/renamed! {'dn': 'cn=u45glh64mo@AutoTest091.local,cn=folder,cn=mail,dc=AutoTest091,dc=local', 'mail_address': '', 'name': 'u45glh64mo@AutoTest091.local/INBOX'} ### ### Unsetting mail/dovecot/mailbox/delete Unsetting mail/dovecot/mailbox/rename File: /usr/sbin/univention-sa-learn Multifile: /etc/postfix/ldap.sharedfolderlocal Cleanup after exception: <type 'exceptions.SystemExit'> 1 Performing UCSTestUDM cleanup... UCSTestUDM cleanup done Restarting univention-directory-listener daemon. ok: run: univention-directory-listener: (pid 25528) 0s, normally down done. *** END TIME: 2015-08-08 17:56:14 *** *** TEST DURATION (H:MM:SS.ms): 0:00:28.704793 *** *** END *** 1 *** *** BEGIN *** ['/usr/bin/python', '43_dovecot_shared_folder_change_primary_mailaddress'] *** *** 40_mail/43_dovecot_shared_folder_change_primary_mailaddress *** Change primary mail address of shared folders *** *** START TIME: 2015-08-08 17:56:14 *** Creating users/user object with {'username': 'kc5lypq0jk', 'set': {'mailHomeServer': 'master091.AutoTest091.local', 'mailPrimaryAddress': 'tkm2pmynwp@AutoTest091.local'}, 'firstname': 'uh14p0rryr', 'lastname': 'zob4em8vqg', 'position': 'cn=users,dc=AutoTest091,dc=local', 'password': 'univention'} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8373 lid=8365) OK: replication complete (nid=8373 lid=8373) Done: replication complete. WARNING: No path in service IPC$ - making it unavailable! NOTE: Service IPC$ is flagged unavailable. Waiting for DRS replication, filter: 'cn=kc5lypq0jk' . . . . . DRS replication took 5 seconds Creating mail/folder object with {'position': 'cn=folder,cn=mail,dc=AutoTest091,dc=local', 'set': {'mailHomeServer': 'master091.AutoTest091.local', 'mailDomain': 'AutoTest091.local', 'name': 'ss2xr41zns', 'mailPrimaryAddress': 'ss2xr41zns@AutoTest091.local'}, 'append': {'sharedFolderUserACL': ['"tkm2pmynwp@AutoTest091.local" "all"'], 'sharedFolderGroupACL': []}} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8374 lid=8373) OK: replication complete (nid=8377 lid=8377) Done: replication complete. ### FAIL ### Maildir '/var/spool/dovecot/private/autotest091.local/ss2xr41zns/Maildir' for shared folder with mail address does not exist! {'dn': 'cn=ss2xr41zns@AutoTest091.local,cn=folder,cn=mail,dc=AutoTest091,dc=local', 'mail_address': 'ss2xr41zns@AutoTest091.local', 'name': 'shared/ss2xr41zns@AutoTest091.local'} ### ### Cleanup after exception: <type 'exceptions.SystemExit'> 1 Performing UCSTestUDM cleanup... UCSTestUDM cleanup done Restarting univention-directory-listener daemon. ok: run: univention-directory-listener: (pid 25601) 0s, normally down done. *** END TIME: 2015-08-08 17:56:30 *** *** TEST DURATION (H:MM:SS.ms): 0:00:16.137824 *** *** END *** 1 *** *** BEGIN *** ['/usr/bin/python', '43_dovecot_shared_folder_create_and_delete'] *** *** 40_mail/43_dovecot_shared_folder_create_and_delete *** Create and remove shared folders with different settings of mail/dovecot/mailbox/delete *** *** START TIME: 2015-08-08 17:56:30 *** Creating users/user object with {'username': 'grqal3xj7f', 'set': {'mailHomeServer': 'master091.AutoTest091.local', 'mailPrimaryAddress': 'tkfd6ttdrc@AutoTest091.local'}, 'firstname': 'eqxyerdzjb', 'lastname': 'g93rdyr7ot', 'position': 'cn=users,dc=AutoTest091,dc=local', 'password': 'univention'} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8391 lid=) CRITICAL: no change of listener transaction id for last 0 checks (nid=8391 lid=8383) OK: replication complete (nid=8391 lid=8391) Done: replication complete. WARNING: No path in service IPC$ - making it unavailable! NOTE: Service IPC$ is flagged unavailable. Waiting for DRS replication, filter: 'cn=grqal3xj7f' . . . DRS replication took 3 seconds Create mail/dovecot/mailbox/rename Create mail/dovecot/mailbox/delete File: /usr/sbin/univention-sa-learn Multifile: /etc/postfix/ldap.sharedfolderlocal Restarting univention-directory-listener daemon. ok: run: univention-directory-listener: (pid 25665) 1s, normally down done. Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8394 lid=8391) CRITICAL: no change of listener transaction id for last 0 checks (nid=8394 lid=8392) OK: replication complete (nid=8394 lid=8394) Done: replication complete. Creating mail/folder object with {'position': 'cn=folder,cn=mail,dc=AutoTest091,dc=local', 'set': {'mailHomeServer': 'master091.AutoTest091.local', 'mailDomain': 'AutoTest091.local', 'name': 'rmhl6fj1ui', 'mailPrimaryAddress': ''}, 'append': {'sharedFolderUserACL': ['"tkfd6ttdrc@AutoTest091.local" "all"'], 'sharedFolderGroupACL': []}} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8395 lid=8394) CRITICAL: no change of listener transaction id for last 0 checks (nid=8395 lid=8394) OK: replication complete (nid=8395 lid=8395) Done: replication complete. {'dn': 'cn=rmhl6fj1ui@AutoTest091.local,cn=folder,cn=mail,dc=AutoTest091,dc=local', 'mail_address': '', 'name': 'rmhl6fj1ui@AutoTest091.local/INBOX'} Removing mail/folder object {'dn': 'cn=rmhl6fj1ui@AutoTest091.local,cn=folder,cn=mail,dc=AutoTest091,dc=local'} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8396 lid=8395) OK: replication complete (nid=8396 lid=8396) Done: replication complete. Setting mail/dovecot/mailbox/rename Setting mail/dovecot/mailbox/delete File: /usr/sbin/univention-sa-learn Multifile: /etc/postfix/ldap.sharedfolderlocal Restarting univention-directory-listener daemon. ok: run: univention-directory-listener: (pid 25793) 0s, normally down done. Waiting for replication: OK: replication complete (nid=8396 lid=8396) Done: replication complete. Creating mail/folder object with {'position': 'cn=folder,cn=mail,dc=AutoTest091,dc=local', 'set': {'mailHomeServer': 'master091.AutoTest091.local', 'mailDomain': 'AutoTest091.local', 'name': 'r9wlp5gegk', 'mailPrimaryAddress': ''}, 'append': {'sharedFolderUserACL': ['"tkfd6ttdrc@AutoTest091.local" "all"'], 'sharedFolderGroupACL': []}} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8397 lid=8396) CRITICAL: no change of listener transaction id for last 0 checks (nid=8397 lid=8396) CRITICAL: no change of listener transaction id for last 0 checks (nid=8397 lid=8396) OK: replication complete (nid=8397 lid=8397) Done: replication complete. {'dn': 'cn=r9wlp5gegk@AutoTest091.local,cn=folder,cn=mail,dc=AutoTest091,dc=local', 'mail_address': '', 'name': 'r9wlp5gegk@AutoTest091.local/INBOX'} Removing mail/folder object {'dn': 'cn=r9wlp5gegk@AutoTest091.local,cn=folder,cn=mail,dc=AutoTest091,dc=local'} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8398 lid=8397) OK: replication complete (nid=8398 lid=8398) Done: replication complete. Setting mail/dovecot/mailbox/rename Setting mail/dovecot/mailbox/delete File: /usr/sbin/univention-sa-learn Multifile: /etc/postfix/ldap.sharedfolderlocal Restarting univention-directory-listener daemon. ok: run: univention-directory-listener: (pid 25913) 1s, normally down done. Waiting for replication: OK: replication complete (nid=8398 lid=8398) Done: replication complete. Creating mail/folder object with {'position': 'cn=folder,cn=mail,dc=AutoTest091,dc=local', 'set': {'mailHomeServer': 'master091.AutoTest091.local', 'mailDomain': 'AutoTest091.local', 'name': 'mkuofiymtr', 'mailPrimaryAddress': 'mkuofiymtr@AutoTest091.local'}, 'append': {'sharedFolderUserACL': ['"tkfd6ttdrc@AutoTest091.local" "all"'], 'sharedFolderGroupACL': []}} Waiting for replication: CRITICAL: no change of listener transaction id for last 0 checks (nid=8399 lid=8398) CRITICAL: no change of listener transaction id for last 0 checks (nid=8399 lid=8398) OK: replication complete (nid=8399 lid=8399) Done: replication complete. {'dn': 'cn=mkuofiymtr@AutoTest091.local,cn=folder,cn=mail,dc=AutoTest091,dc=local', 'mail_address': 'mkuofiymtr@AutoTest091.local', 'name': 'shared/mkuofiymtr@AutoTest091.local'} ### FAIL ### Test 2: maildir '/var/spool/dovecot/private/autotest091.local/mkuofiymtr/Maildir' for shared folder does not exist! {'dn': 'cn=mkuofiymtr@AutoTest091.local,cn=folder,cn=mail,dc=AutoTest091,dc=local', 'mail_address': 'mkuofiymtr@AutoTest091.local', 'name': 'shared/mkuofiymtr@AutoTest091.local'} ### ### Unsetting mail/dovecot/mailbox/delete Unsetting mail/dovecot/mailbox/rename File: /usr/sbin/univention-sa-learn Multifile: /etc/postfix/ldap.sharedfolderlocal Cleanup after exception: <type 'exceptions.SystemExit'> 1 Performing UCSTestUDM cleanup... UCSTestUDM cleanup done Restarting univention-directory-listener daemon. ok: run: univention-directory-listener: (pid 25980) 0s, normally down done. *** END TIME: 2015-08-08 17:57:16 *** *** TEST DURATION (H:MM:SS.ms): 0:00:45.569420 *** *** END *** 1 ***
I added some code to output '/var/log/dovecot.log' and '/var/log/univention/listener.log' in case of a failed test in r62873 and r62874.