diff --git a/drydocker/guam/tests/test_001_user_folders_ssl.sh b/drydocker/guam/tests/test_001_user_folders_ssl.sh index c24f394..76b2716 100755 --- a/drydocker/guam/tests/test_001_user_folders_ssl.sh +++ b/drydocker/guam/tests/test_001_user_folders_ssl.sh @@ -1,75 +1,84 @@ #!/bin/bash set -x ( sleep 1; echo "1"; echo ""; echo "John"; echo "Doe"; echo ""; ) | kolab add-user +rm -rf /var/lib/imap/log/* +mkdir -p \ + /var/lib/imap/log/cyrus-admin/ +chown -R cyrus:mail /var/lib/imap/log/ + while [ $(timeout 10s kolab lm user/john.doe*@example.org 2>/dev/null | wc -l) -lt 15 ]; do echo "Waiting for folders to be created ..." >&3 sleep 10 done echo ". LIST \"\" \"*\"" | timeout 10s imtest -s -u cyrus-admin -a cyrus-admin -w $(grep ^admin_password /etc/kolab/kolab.conf | awk '{print $3}') -p 9993 localhost | grep "^* LIST" >&3 2>&3; retval=$? if [ ${retval} -ne 0 ]; then echo "Listing folders using an SSL connection failed." >&3 if [ ${retval} -eq 124 ]; then echo "Since it was because of a timeout, here's the results for a direct IMAP connection:" >&3 echo ". LIST \"\" \"*\"" | timeout 10s imtest -s -u cyrus-admin -a cyrus-admin -w $(grep ^admin_password /etc/kolab/kolab.conf | awk '{print $3}') -p 993 localhost | grep "^* LIST" >&3 2>&3; retval2=$? if [ ${retval2} -ne 0 ]; then echo "That fails too?" >&3 fi fi fi if [ ${retval} -ne 0 ]; then echo "Initial testing failed, here's some additional input for developers:" >&3 echo "== START /etc/guam/sys.config ==" >&3 cat /etc/guam/sys.config >&3 echo "== END /etc/guam/sys.config ==" >&3 echo "" for log_file in console.log crash.log erlang.log.1 error.log run_erl.log; do if [ -f "/var/log/guam/${log_file}" ]; then echo "" >&3 echo "== START /var/log/guam/${log_file} ==" >&3 cat /var/log/guam/${log_file} >&3 echo "== END /var/log/guam/${log_file} ==" >&3 echo "" >&3 fi done + + echo "== /var/lib/imap/log/ files: ==" + cat /var/lib/imap/log/*/* + echo "== /var/lib/imap/log/ ended ==" fi echo "uid=doe,ou=People,dc=example,dc=org" | ldapdelete -x -h localhost -D "cn=Directory Manager" -w Welcome2KolabSystems >&3 2>&3 while [ $(timeout 10s kolab lm user/john.doe*@example.org 2>/dev/null | wc -l) -gt 0 ]; do echo "Waiting for folders to be removed ..." >&3 sleep 10 done echo "Cleaning out IMAP folders ..." >&3 while [ $(timeout 180s kolab lm 2>/dev/null | wc -l) -gt 0 ]; do kolab lm | while read folder; do kolab dm "${folder}" >&3 2>&3 done done set - -x if [ ${retval} -ne 0 ]; then exit ${retval} fi diff --git a/drydocker/guam/tests/test_002_user_folders_starttls.sh b/drydocker/guam/tests/test_002_user_folders_starttls.sh index ff7debf..fa5a218 100644 --- a/drydocker/guam/tests/test_002_user_folders_starttls.sh +++ b/drydocker/guam/tests/test_002_user_folders_starttls.sh @@ -1,75 +1,84 @@ #!/bin/bash set -x ( sleep 1; echo "1"; echo ""; echo "John"; echo "Doe"; echo ""; ) | kolab add-user +rm -rf /var/lib/imap/log/* +mkdir -p \ + /var/lib/imap/log/cyrus-admin/ +chown -R cyrus:mail /var/lib/imap/log/ + while [ $(timeout 10s kolab lm user/john.doe*@example.org 2>/dev/null | wc -l) -lt 15 ]; do echo "Waiting for folders to be created ..." >&3 sleep 10 done echo ". LIST \"\" \"*\"" | timeout 10s imtest -t "" -u cyrus-admin -a cyrus-admin -w $(grep ^admin_password /etc/kolab/kolab.conf | awk '{print $3}') -p 9143 localhost | grep "^* LIST" >&3 2>&3; retval=$? if [ ${retval} -ne 0 ]; then echo "Listing folders using a STARTTLS connection failed." >&3 if [ ${retval} -eq 124 ]; then echo "Since it was because of a timeout, here's the results for a direct IMAP connection:" >&3 echo ". LIST \"\" \"*\"" | timeout 10s imtest -t "" -u cyrus-admin -a cyrus-admin -w $(grep ^admin_password /etc/kolab/kolab.conf | awk '{print $3}') -p 143 localhost | grep "^* LIST" >&3 2>&3; retval2=$? if [ ${retval2} -ne 0 ]; then echo "That fails too?" >&3 fi fi fi if [ ${retval} -ne 0 ]; then echo "Initial testing failed, here's some additional input for developers:" >&3 echo "== START /etc/guam/sys.config ==" >&3 cat /etc/guam/sys.config >&3 echo "== END /etc/guam/sys.config ==" >&3 echo "" for log_file in console.log crash.log erlang.log.1 error.log run_erl.log; do if [ -f "/var/log/guam/${log_file}" ]; then echo "" >&3 echo "== START /var/log/guam/${log_file} ==" >&3 cat /var/log/guam/${log_file} >&3 echo "== END /var/log/guam/${log_file} ==" >&3 echo "" >&3 fi done + + echo "== /var/lib/imap/log/ files: ==" + cat /var/lib/imap/log/*/* + echo "== /var/lib/imap/log/ ended ==" fi echo "uid=doe,ou=People,dc=example,dc=org" | ldapdelete -x -h localhost -D "cn=Directory Manager" -w Welcome2KolabSystems >&3 2>&3 while [ $(timeout 10s kolab lm user/john.doe*@example.org 2>/dev/null | wc -l) -gt 0 ]; do echo "Waiting for folders to be removed ..." >&3 sleep 10 done echo "Cleaning out IMAP folders ..." >&3 while [ $(timeout 180s kolab lm 2>/dev/null | wc -l) -gt 0 ]; do kolab lm | while read folder; do kolab dm "${folder}" >&3 2>&3 done done set - -x if [ ${retval} -ne 0 ]; then exit ${retval} fi diff --git a/drydocker/guam/tests/test_003_continued_annotation.sh b/drydocker/guam/tests/test_003_continued_annotation.sh index fb12475..c99ee42 100644 --- a/drydocker/guam/tests/test_003_continued_annotation.sh +++ b/drydocker/guam/tests/test_003_continued_annotation.sh @@ -1,111 +1,121 @@ #!/bin/bash set -x ( sleep 1; echo "1"; echo ""; echo "John"; echo "Doe"; echo ""; ) | kolab add-user ( echo "dn: uid=doe,ou=People,dc=example,dc=org" echo "changetype: modify" echo "replace: userPassword" echo "userPassword: Welcome2KolabSystems" echo "" ) | ldapmodify -x -h localhost -D "cn=Directory Manager" -w Welcome2KolabSystems >&3 +rm -rf /var/lib/imap/log/* +mkdir -p \ + /var/lib/imap/log/cyrus-admin/ \ + /var/lib/imap/log/john.doe@example.org/ +chown -R cyrus:mail /var/lib/imap/log/ + while [ $(timeout 10s kolab lm user/john.doe*@example.org 2>/dev/null | wc -l) -lt 15 ]; do echo "Waiting for folders to be created ..." >&3 sleep 10 done kolab set-mailbox-metadata --user john.doe@example.org INBOX /private/vendor/kolab/activesync "{\"DEVICE\":{\"HTC27304ce537203686b076d19961dff\":{\"ID\":\"53a4e4032290304389a6780d8439e57b309ec6a3\",\"TYPE\":\"htcvision\",\"ALIAS\":\"Desire Z\"},\"ApplDLXGCQEKDFHW\":{\"ID\":\"30f810012c5c9aeff9c6b6631634c49d9b6033ce\",\"TYPE\":\"iPad\",\"ALIAS\":null},\"Appl88048XW7A4T\":{\"ID\":\"2d448f173ff17c8895ade15852e9a34b135579a2\",\"TYPE\":\"iPhone\",\"ALIAS\":\"\"},\"SEC171C8D937C972\":{\"ID\":\"1b6a3af3fc5ee9c47efea3412de976f4594816ec\",\"TYPE\":\"SAMSUNGGTS7562\",\"ALIAS\":null},\"BB2B952DB3\":{\"ID\":\"9fbd94d646b95a3471bcba532b8a28bfdf6b20c4\",\"TYPE\":\"BlackBerry\",\"ALIAS\":null},\"229SJOKJJ109D3VTB8CGL1220C\":{\"ID\":\"4053e9fa14f4e29b6c3ac071b35dd79de9fdc913\",\"TYPE\":\"iPhone\",\"ALIAS\":\"\"},\"V9O49B4A294Q779MM01EQENN1O\":{\"ID\":\"b6e81264bea4cdd800a79d16fbbbfa21e4a4bdf5\",\"TYPE\":\"iPhone\",\"ALIAS\":null}},\"FOLDER\":{\"HTC27304ce537203686b076d19961dff\":{\"S\":1},\"ApplDLXGCQEKDFHW\":{\"S\":1},\"Appl88048XW7A4T\":{\"S\":1},\"SEC171C8D937C972\":{\"S\":1},\"BB2B952DB3\":{\"S\":1},\"229SJOKJJ109D3VTB8CGL1220C\":{\"S\":1},\"V9O49B4A294Q779MM01EQENN1O\":{\"S\":1}}}" result_retval=0 echo ". LIST \"\" \"*\"" | timeout 10s imtest -t "" -u john.doe@example.org -a john.doe@example.org -w Welcome2KolabSystems -p 9143 localhost | grep "^* LIST" >&3 2>&3; retval=$? if [ ${retval} -ne 0 ]; then echo "Listing folders using a STARTTLS connection failed." >&3 if [ ${retval} -eq 124 ]; then echo "Since it was because of a timeout, here's the results for a direct IMAP connection:" >&3 echo ". LIST \"\" \"*\"" | timeout 10s imtest -t "" -u john.doe@example.org -a john.doe@example.org -w Welcome2KolabSystems -p 143 localhost | grep "^* LIST" >&3 2>&3; retval2=$? if [ ${retval2} -ne 0 ]; then echo "That fails too?" >&3 else result_retval=$(( ${result_retval} + ${retval} )) fi fi fi echo ". LIST \"\" \"*\"" | timeout 10s imtest -s -u john.doe@example.org -a john.doe@example.org -w Welcome2KolabSystems -p 9993 localhost | grep "^* LIST" >&3 2>&3; retval=$? if [ ${retval} -ne 0 ]; then echo "Listing folders using an SSL connection failed." >&3 if [ ${retval} -eq 124 ]; then echo "Since it was because of a timeout, here's the results for a direct IMAP connection:" >&3 echo ". LIST \"\" \"*\"" | timeout 10s imtest -s -u john.doe@example.org -a john.doe@example.org -w Welcome2KolabSystems -p 993 localhost | grep "^* LIST" >&3 2>&3; retval2=$? if [ ${retval2} -ne 0 ]; then echo "That fails too?" >&3 else result_retval=$(( ${result_retval} + ${retval} )) fi fi fi retval=${result_retval} if [ ${retval} -ne 0 ]; then echo "Initial testing failed, here's some additional input for developers:" >&3 echo "== START /etc/guam/sys.config ==" >&3 cat /etc/guam/sys.config >&3 echo "== END /etc/guam/sys.config ==" >&3 echo "" for log_file in console.log crash.log erlang.log.1 error.log run_erl.log; do if [ -f "/var/log/guam/${log_file}" ]; then echo "" >&3 echo "== START /var/log/guam/${log_file} ==" >&3 cat /var/log/guam/${log_file} >&3 echo "== END /var/log/guam/${log_file} ==" >&3 echo "" >&3 fi done + + echo "== /var/lib/imap/log/ files: ==" + cat /var/lib/imap/log/*/* + echo "== /var/lib/imap/log/ ended ==" fi for i in `seq 11 20`; do echo "uid=doe${i},ou=People,dc=example,dc=org" done | ldapdelete -x -h localhost -D "cn=Directory Manager" -w Welcome2KolabSystems -c >&3 2>&3 while [ $(timeout 10s kolab lm user/john.doe*@example.org 2>/dev/null | wc -l) -gt 0 ]; do echo "Waiting for folders to be removed ..." >&3 sleep 10 done echo "Cleaning out IMAP folders ..." >&3 while [ $(timeout 180s kolab lm 2>/dev/null | wc -l) -gt 0 ]; do kolab lm | while read folder; do kolab dm "${folder}" >&3 2>&3 done done set - -x if [ ${retval} -ne 0 ]; then exit ${retval} fi diff --git a/drydocker/guam/tests/test_004_many_more_folders.sh b/drydocker/guam/tests/test_004_many_more_folders.sh index 288885d..1221c17 100644 --- a/drydocker/guam/tests/test_004_many_more_folders.sh +++ b/drydocker/guam/tests/test_004_many_more_folders.sh @@ -1,146 +1,156 @@ #!/bin/bash set -x for i in `seq 11 30`; do ( sleep 1; echo "1"; echo ""; echo "John"; echo "Doe${i}"; echo ""; ) | kolab add-user ( echo "dn: uid=doe${i},ou=People,dc=example,dc=org" echo "changetype: modify" echo "replace: userPassword" echo "userPassword: Welcome2KolabSystems" echo "" ) | ldapmodify -x -h localhost -D "cn=Directory Manager" -w Welcome2KolabSystems >&3 done +rm -rf /var/lib/imap/log/* +mkdir -p \ + /var/lib/imap/log/cyrus-admin/ \ + /var/lib/imap/log/john.doe@example.org/ +chown -R cyrus:mail /var/lib/imap/log/ + while [ $(timeout 10s kolab lm user/john.doe*@example.org 2>/dev/null | wc -l) -lt 300 ]; do echo "Waiting for folders to be created ..." >&3 sleep 10 done kolab sam user/john.doe*@example.org anyone lrs for i in `seq 101 450`; do kolab cm shared/lists/list${i}@example.org kolab sam shared/lists/list${i}@example.org anyone lrs done for team in Sales Marketing Engineering Accounting HR Legal; do kolab cm --metadata=/shared/vendor/kolab/folder-type=event shared/${team}/Calendar@example.org done for i in `seq 1 10`; do foldername="shared/$(head -c 500 /dev/urandom | tr -dc _A-Z-a-z-0-9)@example.org" kolab cm ${foldername} kolab sam ${foldername} anyone lrs done result_retval=0 echo ". LIST \"\" \"*\"" | timeout 10s imtest -t "" -u john.doe11@example.org -a john.doe11@example.org -w Welcome2KolabSystems -p 9143 localhost | grep "^* LIST" >&3 2>&3; retval=$? if [ ${retval} -ne 0 ]; then echo "Listing folders using a STARTTLS connection failed." >&3 if [ ${retval} -eq 124 ]; then echo "Since it was because of a timeout, here's the results for a direct IMAP connection:" >&3 echo ". LIST \"\" \"*\"" | timeout 10s imtest -t "" -u john.doe11@example.org -a john.doe11@example.org -w Welcome2KolabSystems -p 143 localhost | grep "^* LIST" >&3 2>&3; retval2=$? if [ ${retval2} -ne 0 ]; then echo "That fails too?" >&3 else result_retval=$(( ${result_retval} + ${retval} )) fi fi fi echo ". LIST \"\" \"*\"" | timeout 10s imtest -t "" -u cyrus-admin -a cyrus-admin -w $(grep ^admin_password /etc/kolab/kolab.conf | awk '{print $3}') -p 9143 localhost | grep "^* LIST" >&3 2>&3; retval=$? if [ ${retval} -ne 0 ]; then echo "Listing folders using a STARTTLS connection failed." >&3 if [ ${retval} -eq 124 ]; then echo "Since it was because of a timeout, here's the results for a direct IMAP connection:" >&3 echo ". LIST \"\" \"*\"" | timeout 10s imtest -t "" -u cyrus-admin -a cyrus-admin -w $(grep ^admin_password /etc/kolab/kolab.conf | awk '{print $3}') -p 143 localhost | grep "^* LIST" >&3 2>&3; retval2=$? if [ ${retval2} -ne 0 ]; then echo "That fails too?" >&3 else result_retval=$(( ${result_retval} + ${retval} )) fi fi fi echo ". LIST \"\" \"*\"" | timeout 10s imtest -s -u cyrus-admin -a cyrus-admin -w $(grep ^admin_password /etc/kolab/kolab.conf | awk '{print $3}') -p 9993 localhost | grep "^* LIST" >&3 2>&3; retval=$? if [ ${retval} -ne 0 ]; then echo "Listing folders using an SSL connection failed." >&3 if [ ${retval} -eq 124 ]; then echo "Since it was because of a timeout, here's the results for a direct IMAP connection:" >&3 echo ". LIST \"\" \"*\"" | timeout 10s imtest -s -u cyrus-admin -a cyrus-admin -w $(grep ^admin_password /etc/kolab/kolab.conf | awk '{print $3}') -p 993 localhost | grep "^* LIST" >&3 2>&3; retval2=$? if [ ${retval2} -ne 0 ]; then echo "That fails too?" >&3 else result_retval=$(( ${result_retval} + ${retval} )) fi fi fi retval=${result_retval} if [ ${retval} -ne 0 ]; then echo "Initial testing failed, here's some additional input for developers:" >&3 echo "== START /etc/guam/sys.config ==" >&3 cat /etc/guam/sys.config >&3 echo "== END /etc/guam/sys.config ==" >&3 echo "" for log_file in console.log crash.log erlang.log.1 error.log run_erl.log; do if [ -f "/var/log/guam/${log_file}" ]; then echo "" >&3 echo "== START /var/log/guam/${log_file} ==" >&3 cat /var/log/guam/${log_file} >&3 echo "== END /var/log/guam/${log_file} ==" >&3 echo "" >&3 fi done + + echo "== /var/lib/imap/log/ files: ==" + cat /var/lib/imap/log/*/* + echo "== /var/lib/imap/log/ ended ==" fi for i in `seq 11 30`; do echo "uid=doe${i},ou=People,dc=example,dc=org" done | ldapdelete -x -h localhost -D "cn=Directory Manager" -w Welcome2KolabSystems -c >&3 while [ $(timeout 10s kolab lm user/john.doe*@example.org 2>/dev/null | wc -l) -gt 0 ]; do echo "Waiting for folders to be removed ..." >&3 sleep 10 done echo "Cleaning out IMAP folders ..." >&3 while [ $(timeout 180s kolab lm 2>/dev/null | wc -l) -gt 0 ]; do kolab lm | while read folder; do kolab dm "${folder}" >&3 done done set - -x if [ ${retval} -ne 0 ]; then exit ${retval} fi