1.1 --- a/tests/test_person_invitation_refresh.sh Wed Mar 09 21:38:56 2016 +0100
1.2 +++ b/tests/test_person_invitation_refresh.sh Thu Mar 10 01:43:31 2016 +0100
1.3 @@ -4,9 +4,6 @@
1.4
1.5 USER="mailto:vincent.vole@example.com"
1.6 SENDER="mailto:paul.boddie@example.com"
1.7 -FBFILE="$STORE/$USER/freebusy"
1.8 -FBOTHERFILE="$STORE/$USER/freebusy-other/$SENDER"
1.9 -FBSENDERFILE="$STORE/$SENDER/freebusy"
1.10
1.11 mkdir -p "$PREFS/$USER"
1.12 echo 'Europe/Oslo' > "$PREFS/$USER/TZID"
1.13 @@ -21,7 +18,10 @@
1.14
1.15 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-person-recurring.txt" 2>> $ERROR
1.16
1.17 - grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBSENDERFILE" \
1.18 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy" \
1.19 +> out1f.tmp
1.20 +
1.21 + grep -q "^20141212T090000Z${TAB}20141212T100000Z" "out1f.tmp" \
1.22 && echo "Success" \
1.23 || echo "Failed"
1.24
1.25 @@ -45,12 +45,17 @@
1.26 && echo "Success" \
1.27 || echo "Failed"
1.28
1.29 - ! [ -e "$FBFILE" ] \
1.30 -|| ! grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBFILE" \
1.31 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
1.32 +> out3f.tmp
1.33 +
1.34 + ! grep -q "^20141212T090000Z${TAB}20141212T100000Z" "out3f.tmp" \
1.35 && echo "Success" \
1.36 || echo "Failed"
1.37
1.38 - grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBOTHERFILE" \
1.39 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy_other" "$SENDER" \
1.40 +> out3f.tmp
1.41 +
1.42 + grep -q "^20141212T090000Z${TAB}20141212T100000Z" "out3f.tmp" \
1.43 && echo "Success" \
1.44 || echo "Failed"
1.45
1.46 @@ -60,7 +65,10 @@
1.47 | tee out4.tmp \
1.48 | "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR
1.49
1.50 - grep -q "^20141212T090000Z${TAB}20141212T100000Z" "$FBFILE" \
1.51 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
1.52 +> out4f.tmp
1.53 +
1.54 + grep -q "^20141212T090000Z${TAB}20141212T100000Z" "out4f.tmp" \
1.55 && echo "Success" \
1.56 || echo "Failed"
1.57
1.58 @@ -78,8 +86,11 @@
1.59
1.60 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-request-person-recurring-reschedule-instance.txt" 2>> $ERROR
1.61
1.62 - grep -q "^20141011T080000Z${TAB}20141011T090000Z" "$FBSENDERFILE" \
1.63 -&& ! grep -q "^20141010T080000Z${TAB}20141010T090000Z" "$FBSENDERFILE" \
1.64 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy" \
1.65 +> out5f.tmp
1.66 +
1.67 + grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out5f.tmp" \
1.68 +&& ! grep -q "^20141010T080000Z${TAB}20141010T090000Z" "out5f.tmp" \
1.69 && echo "Success" \
1.70 || echo "Failed"
1.71
1.72 @@ -102,8 +113,14 @@
1.73 | "$SHOWMAIL" \
1.74 > out6a.tmp
1.75
1.76 - [ -e "$STORE/$USER/objects/event8@example.com" ] \
1.77 -&& [ -e "$STORE/$USER/recurrences/event8@example.com/20141010T080000Z" ] \
1.78 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "object" "event8@example.com" \
1.79 +> out6O.tmp
1.80 +
1.81 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "recurrence" "event8@example.com" "20141010T080000Z" \
1.82 +> out6R.tmp
1.83 +
1.84 + grep -q 'event8@example.com' "out6O.tmp" \
1.85 +&& grep -q 'event8@example.com' "out6R.tmp" \
1.86 && echo "Success" \
1.87 || echo "Failed"
1.88
1.89 @@ -112,14 +129,26 @@
1.90
1.91 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-person-recurring-rescheduled-instance.txt" 2>> $ERROR
1.92
1.93 - [ -e "$STORE/$SENDER/objects/event8@example.com" ] \
1.94 -&& ! [ -e "$STORE/$SENDER/recurrences/event8@example.com/20141010T080000Z" ] \
1.95 -&& [ -e "$STORE/$SENDER/cancellations/recurrences/event8@example.com/20141010T080000Z" ] \
1.96 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "object" "event8@example.com" \
1.97 +> out6O2.tmp
1.98 +
1.99 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "recurrence" "event8@example.com" "20141010T080000Z" \
1.100 +> out6R2.tmp
1.101 +
1.102 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "cancelled_recurrences" "event8@example.com" \
1.103 +> out6C.tmp
1.104 +
1.105 + grep -q 'event8@example.com' "out6O2.tmp" \
1.106 +&& ! grep -q 'event8@example.com' "out6R2.tmp" \
1.107 +&& grep -q '20141010T080000Z' "out6C.tmp" \
1.108 && echo "Success" \
1.109 || echo "Failed"
1.110
1.111 - ! grep -q "^20141010T080000Z${TAB}20141010T090000Z" "$FBSENDERFILE" \
1.112 -&& ! grep -q "^20141011T080000Z${TAB}20141011T090000Z" "$FBSENDERFILE" \
1.113 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy" \
1.114 +> out6f.tmp
1.115 +
1.116 + ! grep -q "^20141010T080000Z${TAB}20141010T090000Z" "out6f.tmp" \
1.117 +&& ! grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out6f.tmp" \
1.118 && echo "Success" \
1.119 || echo "Failed"
1.120
1.121 @@ -143,9 +172,18 @@
1.122 | "$SHOWMAIL" \
1.123 > out7a.tmp
1.124
1.125 - [ -e "$STORE/$USER/objects/event8@example.com" ] \
1.126 -&& ! [ -e "$STORE/$USER/recurrences/event8@example.com/20141010T080000Z" ] \
1.127 -&& [ -e "$STORE/$USER/cancellations/recurrences/event8@example.com/20141010T080000Z" ] \
1.128 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "object" "event8@example.com" \
1.129 +> out7O.tmp
1.130 +
1.131 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "recurrence" "event8@example.com" "20141010T080000Z" \
1.132 +> out7R.tmp
1.133 +
1.134 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "cancelled_recurrences" "event8@example.com" \
1.135 +> out7C.tmp
1.136 +
1.137 + grep -q 'event8@example.com' "out7O.tmp" \
1.138 +&& ! grep -q 'event8@example.com' "out7R.tmp" \
1.139 +&& grep -q '20141010T080000Z' "out7C.tmp" \
1.140 && echo "Success" \
1.141 || echo "Failed"
1.142
1.143 @@ -153,8 +191,11 @@
1.144
1.145 "$OUTGOING_SCRIPT" $ARGS < "$TEMPLATES/event-add-person-recurring-rescheduled-instance.txt" 2>> $ERROR
1.146
1.147 - grep -q "^20141010T080000Z${TAB}20141010T090000Z" "$FBSENDERFILE" \
1.148 -&& ! grep -q "^20141011T080000Z${TAB}20141011T090000Z" "$FBSENDERFILE" \
1.149 + "$LIST_SCRIPT" $LIST_ARGS "$SENDER" "freebusy" \
1.150 +> out7f.tmp
1.151 +
1.152 + grep -q "^20141010T080000Z${TAB}20141010T090000Z" "out7f.tmp" \
1.153 +&& ! grep -q "^20141011T080000Z${TAB}20141011T090000Z" "out7f.tmp" \
1.154 && echo "Success" \
1.155 || echo "Failed"
1.156
1.157 @@ -162,17 +203,32 @@
1.158 | "$SHOWMAIL" \
1.159 > out8.tmp
1.160
1.161 - [ -e "$STORE/$USER/objects/event8@example.com" ] \
1.162 -&& [ -e "$STORE/$USER/recurrences/event8@example.com/20141010T080000Z" ] \
1.163 -&& ! [ -e "$STORE/$USER/cancellations/recurrences/event8@example.com/20141010T080000Z" ] \
1.164 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "object" "event8@example.com" \
1.165 +> out8O.tmp
1.166 +
1.167 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "recurrence" "event8@example.com" "20141010T080000Z" \
1.168 +> out8R.tmp
1.169 +
1.170 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "cancelled_recurrences" "event8@example.com" \
1.171 +> out8C.tmp
1.172 +
1.173 + grep -q 'event8@example.com' "out8O.tmp" \
1.174 +&& grep -q 'event8@example.com' "out8R.tmp" \
1.175 +&& ! grep -q '20141010T080000Z' "out8C.tmp" \
1.176 && echo "Success" \
1.177 || echo "Failed"
1.178
1.179 - ! grep -q "^20141010T080000Z${TAB}20141010T090000Z" "$FBFILE" \
1.180 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
1.181 +> out8f.tmp
1.182 +
1.183 + ! grep -q "^20141010T080000Z${TAB}20141010T090000Z" "out8f.tmp" \
1.184 && echo "Success" \
1.185 || echo "Failed"
1.186
1.187 - grep -q "^20141010T080000Z${TAB}20141010T090000Z" "$FBOTHERFILE" \
1.188 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy_other" "$SENDER" \
1.189 +> out8f.tmp
1.190 +
1.191 + grep -q "^20141010T080000Z${TAB}20141010T090000Z" "out8f.tmp" \
1.192 && echo "Success" \
1.193 || echo "Failed"
1.194
1.195 @@ -182,7 +238,10 @@
1.196 | tee out9.tmp \
1.197 | "$OUTGOING_SCRIPT" $ARGS 2>> $ERROR
1.198
1.199 - grep -q "^20141010T080000Z${TAB}20141010T090000Z" "$FBFILE" \
1.200 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "freebusy" \
1.201 +> out9f.tmp
1.202 +
1.203 + grep -q "^20141010T080000Z${TAB}20141010T090000Z" "out9f.tmp" \
1.204 && echo "Success" \
1.205 || echo "Failed"
1.206
1.207 @@ -205,7 +264,13 @@
1.208 | "$SHOWMAIL" \
1.209 > out11.tmp
1.210
1.211 - [ -e "$STORE/$USER/objects/event8@example.com" ] \
1.212 -&& [ -e "$STORE/$USER/recurrences/event8@example.com/20141010T080000Z" ] \
1.213 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "object" "event8@example.com" \
1.214 +> out11O.tmp
1.215 +
1.216 + "$LIST_SCRIPT" $LIST_ARGS "$USER" "recurrence" "event8@example.com" "20141010T080000Z" \
1.217 +> out11R.tmp
1.218 +
1.219 + grep -q 'event8@example.com' "out11O.tmp" \
1.220 +&& grep -q 'event8@example.com' "out11R.tmp" \
1.221 && echo "Success" \
1.222 || echo "Failed"