paul@573 | 1 | #!/bin/sh |
paul@573 | 2 | |
paul@1024 | 3 | . "`dirname \"$0\"`/common.sh" |
paul@573 | 4 | |
paul@644 | 5 | ROOM="mailto:resource-room-confroom@example.com" |
paul@644 | 6 | CAR="mailto:resource-car-porsche911@example.com" |
paul@573 | 7 | |
paul@644 | 8 | mkdir -p "$PREFS/$ROOM" |
paul@644 | 9 | echo 'Europe/Oslo' > "$PREFS/$ROOM/TZID" |
paul@644 | 10 | echo 'share' > "$PREFS/$ROOM/freebusy_sharing" |
paul@644 | 11 | |
paul@644 | 12 | mkdir -p "$PREFS/$CAR" |
paul@644 | 13 | echo 'Europe/Mariehamn' > "$PREFS/$CAR/TZID" |
paul@644 | 14 | echo 'share' > "$PREFS/$CAR/freebusy_sharing" |
paul@640 | 15 | |
paul@602 | 16 | "$RESOURCE_SCRIPT" $ARGS < $TEMPLATES/fb-request-all.txt 2>> $ERROR \ |
paul@585 | 17 | | "$SHOWMAIL" \ |
paul@573 | 18 | > out0.tmp |
paul@573 | 19 | |
paul@573 | 20 | grep -q 'METHOD:REPLY' out0.tmp \ |
paul@575 | 21 | && ! grep -q '^FREEBUSY' out0.tmp \ |
paul@573 | 22 | && echo "Success" \ |
paul@573 | 23 | || echo "Failed" |
paul@573 | 24 | |
paul@602 | 25 | "$RESOURCE_SCRIPT" $ARGS < $TEMPLATES/fb-request.txt 2>> $ERROR \ |
paul@585 | 26 | | "$SHOWMAIL" \ |
paul@573 | 27 | > out1.tmp |
paul@573 | 28 | |
paul@573 | 29 | grep -q 'METHOD:REPLY' out1.tmp \ |
paul@575 | 30 | && ! grep -q '^FREEBUSY' out1.tmp \ |
paul@573 | 31 | && echo "Success" \ |
paul@573 | 32 | || echo "Failed" |
paul@573 | 33 | |
paul@602 | 34 | "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/event-request-multiple.txt" 2>> $ERROR \ |
paul@585 | 35 | | "$SHOWMAIL" \ |
paul@573 | 36 | > out2.tmp |
paul@573 | 37 | |
paul@573 | 38 | grep -q 'METHOD:REPLY' out2.tmp \ |
paul@573 | 39 | && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out2.tmp \ |
paul@573 | 40 | && echo "Success" \ |
paul@573 | 41 | || echo "Failed" |
paul@573 | 42 | |
paul@602 | 43 | "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/event-request-multiple.txt" 2>> $ERROR \ |
paul@585 | 44 | | "$SHOWMAIL" \ |
paul@573 | 45 | > out3.tmp |
paul@573 | 46 | |
paul@573 | 47 | grep -q 'METHOD:REPLY' out3.tmp \ |
paul@573 | 48 | && grep -q 'ATTENDEE;PARTSTAT=ACCEPTED' out3.tmp \ |
paul@573 | 49 | && echo "Success" \ |
paul@573 | 50 | || echo "Failed" |
paul@573 | 51 | |
paul@602 | 52 | "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/fb-request.txt" 2>> $ERROR \ |
paul@585 | 53 | | "$SHOWMAIL" \ |
paul@573 | 54 | > out4.tmp |
paul@573 | 55 | |
paul@573 | 56 | grep -q 'METHOD:REPLY' out4.tmp \ |
paul@573 | 57 | && grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out4.tmp \ |
paul@573 | 58 | && echo "Success" \ |
paul@573 | 59 | || echo "Failed" |
paul@573 | 60 | |
paul@602 | 61 | "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/fb-request-car.txt" 2>> $ERROR \ |
paul@585 | 62 | | "$SHOWMAIL" \ |
paul@573 | 63 | > out5.tmp |
paul@573 | 64 | |
paul@573 | 65 | grep -q 'METHOD:REPLY' out5.tmp \ |
paul@573 | 66 | && grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out5.tmp \ |
paul@573 | 67 | && echo "Success" \ |
paul@573 | 68 | || echo "Failed" |
paul@573 | 69 | |
paul@602 | 70 | "$RESOURCE_SCRIPT" $ARGS < "$TEMPLATES/event-cancel-multiple-attendee.txt" 2>> $ERROR |
paul@573 | 71 | echo "Cancel..." |
paul@573 | 72 | |
paul@602 | 73 | "$RESOURCE_SCRIPT" $ARGS -o 'resource-room-confroom@example.com' < "$TEMPLATES/fb-request.txt" 2>> $ERROR \ |
paul@585 | 74 | | "$SHOWMAIL" \ |
paul@573 | 75 | > out6.tmp |
paul@573 | 76 | |
paul@573 | 77 | grep -q 'METHOD:REPLY' out6.tmp \ |
paul@575 | 78 | && ! grep -q '^FREEBUSY' out6.tmp \ |
paul@573 | 79 | && echo "Success" \ |
paul@573 | 80 | || echo "Failed" |
paul@573 | 81 | |
paul@602 | 82 | "$RESOURCE_SCRIPT" $ARGS -o 'resource-car-porsche911@example.com' < "$TEMPLATES/fb-request-car.txt" 2>> $ERROR \ |
paul@585 | 83 | | "$SHOWMAIL" \ |
paul@573 | 84 | > out7.tmp |
paul@573 | 85 | |
paul@573 | 86 | grep -q 'METHOD:REPLY' out7.tmp \ |
paul@573 | 87 | && grep -q 'FREEBUSY;FBTYPE=BUSY:20141126T150000Z/20141126T160000Z' out7.tmp \ |
paul@573 | 88 | && echo "Success" \ |
paul@573 | 89 | || echo "Failed" |