client/servlet/test/src/webservice/tests/t10.sh

Code
Comments
Other
Rev Date Author Line
3486 16 Nov 09 gregory 1 # PUT empty file in home directory of $user, during impersonation
3486 16 Nov 09 gregory 2 # Count file items
3486 16 Nov 09 gregory 3 generate_name
3486 16 Nov 09 gregory 4 GET "$A" "$resource/files?$auth&select=Id&whereName==${i}_$name"
3486 16 Nov 09 gregory 5 # A should be empty now
3486 16 Nov 09 gregory 6 echo "Name" > $B
3486 16 Nov 09 gregory 7 echo "$name" >> $B
3976 11 Nov 10 gregory 8 PUT "$B" "$resource/files?username=root&password=root&impersonate=$user" 
3486 16 Nov 09 gregory 9 GET "$C" "$resource/files?$auth&select=Id&whereName==${i}_$name"
3486 16 Nov 09 gregory 10 diff=`diff $A $C`;
3486 16 Nov 09 gregory 11 if [ "$diff" == "" ]; then
3486 16 Nov 09 gregory 12         fail "$test" "File $name was not created as the impersonated user demo. Check $A, $B and $C"
3486 16 Nov 09 gregory 13 fi
3486 16 Nov 09 gregory 14 # $Id$