imip-agent

Annotated tests/test_resource_invitation_recurring_timezones.sh

1465:0c623c86704f
2020-08-03 Paul Boddie Changed diagram font to sans-serif.
paul@641 1
#!/bin/sh
paul@641 2
paul@1024 3
. "`dirname \"$0\"`/common.sh"
paul@641 4
paul@641 5
USER="mailto:resource-room-confroom@example.com"
paul@641 6
paul@641 7
mkdir -p "$PREFS/$USER"
paul@641 8
echo 'Europe/Oslo' > "$PREFS/$USER/TZID"
paul@641 9
echo 'share' > "$PREFS/$USER/freebusy_sharing"
paul@641 10
paul@641 11
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@641 12
| "$SHOWMAIL" \
paul@641 13
> out0.tmp
paul@641 14
paul@641 15
   grep -q 'METHOD:REPLY' out0.tmp \
paul@641 16
&& ! grep -q '^FREEBUSY' out0.tmp \
paul@641 17
&& echo "Success" \
paul@641 18
|| echo "Failed"
paul@641 19
paul@641 20
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-exdate.txt" 2>> $ERROR \
paul@641 21
| "$SHOWMAIL" \
paul@641 22
> out2.tmp
paul@641 23
paul@641 24
   grep -q 'METHOD:REPLY' out2.tmp \
paul@641 25
&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out2.tmp \
paul@641 26
&& echo "Success" \
paul@641 27
|| echo "Failed"
paul@641 28
paul@641 29
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@641 30
| "$SHOWMAIL" \
paul@641 31
> out3.tmp
paul@641 32
paul@641 33
   grep -q 'METHOD:REPLY' out3.tmp \
paul@641 34
&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out3.tmp \
paul@641 35
&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out3.tmp \
paul@641 36
&& grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out3.tmp \
paul@641 37
&& echo "Success" \
paul@641 38
|| echo "Failed"
paul@641 39
paul@641 40
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-exdate.txt" 2>> $ERROR
paul@641 41
echo "Cancel..."
paul@641 42
paul@641 43
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@641 44
| "$SHOWMAIL" \
paul@641 45
> out4.tmp
paul@641 46
paul@641 47
   grep -q 'METHOD:REPLY' out4.tmp \
paul@641 48
&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out4.tmp \
paul@641 49
&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out4.tmp \
paul@641 50
&& echo "Success" \
paul@641 51
|| echo "Failed"
paul@641 52
paul@641 53
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-exdate-floating.txt" 2>> $ERROR \
paul@641 54
| "$SHOWMAIL" \
paul@641 55
> out5.tmp
paul@641 56
paul@641 57
   grep -q 'METHOD:REPLY' out5.tmp \
paul@641 58
&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out5.tmp \
paul@641 59
&& echo "Success" \
paul@641 60
|| echo "Failed"
paul@641 61
paul@641 62
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@641 63
| "$SHOWMAIL" \
paul@641 64
> out6.tmp
paul@641 65
paul@641 66
   grep -q 'METHOD:REPLY' out6.tmp \
paul@641 67
&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out6.tmp \
paul@641 68
&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out6.tmp \
paul@641 69
&& grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out6.tmp \
paul@641 70
&& echo "Success" \
paul@641 71
|| echo "Failed"
paul@641 72
paul@641 73
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-exdate-floating.txt" 2>> $ERROR
paul@641 74
echo "Cancel..."
paul@641 75
paul@641 76
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@641 77
| "$SHOWMAIL" \
paul@641 78
> out7.tmp
paul@641 79
paul@641 80
   grep -q 'METHOD:REPLY' out7.tmp \
paul@641 81
&& ! grep -q '^FREEBUSY' out7.tmp \
paul@641 82
&& echo "Success" \
paul@641 83
|| echo "Failed"
paul@642 84
paul@642 85
# Switch time zones.
paul@642 86
paul@642 87
echo 'Europe/Mariehamn' > "$PREFS/$USER/TZID"
paul@642 88
paul@642 89
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-exdate.txt" 2>> $ERROR \
paul@642 90
| "$SHOWMAIL" \
paul@642 91
> out8.tmp
paul@642 92
paul@642 93
   grep -q 'METHOD:REPLY' out8.tmp \
paul@642 94
&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out8.tmp \
paul@642 95
&& echo "Success" \
paul@642 96
|| echo "Failed"
paul@642 97
paul@642 98
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@642 99
| "$SHOWMAIL" \
paul@642 100
> out9.tmp
paul@642 101
paul@642 102
   grep -q 'METHOD:REPLY' out9.tmp \
paul@642 103
&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out9.tmp \
paul@642 104
&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T090000Z/20141212T100000Z' out9.tmp \
paul@642 105
&& grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out9.tmp \
paul@642 106
&& echo "Success" \
paul@642 107
|| echo "Failed"
paul@642 108
paul@642 109
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-recurring-exdate.txt" 2>> $ERROR
paul@642 110
echo "Cancel..."
paul@642 111
paul@642 112
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@642 113
| "$SHOWMAIL" \
paul@642 114
> out10.tmp
paul@642 115
paul@642 116
   grep -q 'METHOD:REPLY' out10.tmp \
paul@642 117
&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T090000Z/20141114T100000Z' out10.tmp \
paul@642 118
&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T090000Z/20150109T100000Z' out10.tmp \
paul@642 119
&& echo "Success" \
paul@642 120
|| echo "Failed"
paul@642 121
paul@642 122
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-exdate-floating.txt" 2>> $ERROR \
paul@642 123
| "$SHOWMAIL" \
paul@642 124
> out11.tmp
paul@642 125
paul@642 126
   grep -q 'METHOD:REPLY' out11.tmp \
paul@642 127
&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out11.tmp \
paul@642 128
&& echo "Success" \
paul@642 129
|| echo "Failed"
paul@642 130
paul@642 131
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@642 132
| "$SHOWMAIL" \
paul@642 133
> out12.tmp
paul@642 134
paul@642 135
   grep -q 'METHOD:REPLY' out12.tmp \
paul@642 136
&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T080000Z/20141114T090000Z' out12.tmp \
paul@642 137
&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141212T080000Z/20141212T090000Z' out12.tmp \
paul@642 138
&& grep -q 'FREEBUSY;FBTYPE=BUSY:20150109T080000Z/20150109T090000Z' out12.tmp \
paul@642 139
&& echo "Success" \
paul@642 140
|| echo "Failed"