imip-agent

Annotated tests/test_resource_invitation_recurring_day.sh

1343:f184dc45aadf
2017-10-18 Paul Boddie Attempt to prevent erroneous store type configuration overriding.
paul@575 1
#!/bin/sh
paul@575 2
paul@1024 3
. "`dirname \"$0\"`/common.sh"
paul@575 4
paul@640 5
USER="mailto:resource-room-confroom@example.com"
paul@575 6
paul@640 7
mkdir -p "$PREFS/$USER"
paul@640 8
echo 'Europe/Oslo' > "$PREFS/$USER/TZID"
paul@640 9
echo 'share' > "$PREFS/$USER/freebusy_sharing"
paul@640 10
paul@602 11
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@585 12
| "$SHOWMAIL" \
paul@575 13
> out0.tmp
paul@575 14
paul@575 15
   grep -q 'METHOD:REPLY' out0.tmp \
paul@575 16
&& ! grep -q '^FREEBUSY' out0.tmp \
paul@575 17
&& echo "Success" \
paul@575 18
|| echo "Failed"
paul@575 19
paul@602 20
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day.txt" 2>> $ERROR \
paul@585 21
| "$SHOWMAIL" \
paul@575 22
> out1.tmp
paul@575 23
paul@575 24
   grep -q 'METHOD:REPLY' out1.tmp \
paul@575 25
&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out1.tmp \
paul@575 26
&& echo "Success" \
paul@575 27
|| echo "Failed"
paul@575 28
paul@602 29
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@585 30
| "$SHOWMAIL" \
paul@575 31
> out2.tmp
paul@575 32
paul@575 33
   grep -q 'METHOD:REPLY' out2.tmp \
paul@575 34
&& [ `grep 'FREEBUSY;FBTYPE=BUSY' out2.tmp | wc -l` = '3' ] \
paul@575 35
&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141211T230000Z/20141212T230000Z' out2.tmp \
paul@575 36
&& echo "Success" \
paul@575 37
|| echo "Failed"
paul@627 38
paul@627 39
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-request-recurring-day-reschedule-instance.txt" 2>> $ERROR \
paul@627 40
| "$SHOWMAIL" \
paul@627 41
> out3.tmp
paul@627 42
paul@627 43
   grep -q 'METHOD:REPLY' out3.tmp \
paul@627 44
&& grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out3.tmp \
paul@627 45
&& echo "Success" \
paul@627 46
|| echo "Failed"
paul@627 47
paul@627 48
  "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/fb-request-all.txt" 2>> $ERROR \
paul@627 49
| "$SHOWMAIL" \
paul@627 50
> out4.tmp
paul@627 51
paul@627 52
   grep -q 'METHOD:REPLY' out4.tmp \
paul@627 53
&& grep -q 'FREEBUSY;FBTYPE=BUSY:20141114T230000Z/20141115T230000Z' out4.tmp \
paul@627 54
&& ! grep -q 'FREEBUSY;FBTYPE=BUSY:20141113T230000Z/20141114T230000Z' out4.tmp \
paul@627 55
&& echo "Success" \
paul@627 56
|| echo "Failed"