mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-25 17:46:52 +00:00
Make the curl and SQL requests when we see them
This allows us to have more complex test files where an action is taken, then we test something, then another action is taken, etc. Changes to test files are required so that URL is defined after all the required settings are set. Changes to the result files are either whitespace changes due to above logic changes, or printing out a SQL Result header before each result. I figured it was useful.
This commit is contained in:
parent
7f2cccb94a
commit
7c47658bee
160
testing/dav_test
160
testing/dav_test
@ -61,6 +61,7 @@ my $url;
|
||||
my $script; # Not neede as global, used as flag.
|
||||
my $script_dir;
|
||||
my $is_head_request = 0;
|
||||
my $sql_count = 1;
|
||||
my @auth = ( "--user", "user1:user1" );
|
||||
|
||||
# Allow easier pasting of tests on the command line.
|
||||
@ -125,7 +126,7 @@ while( <TEST> ) {
|
||||
do_sql( $sql_statement );
|
||||
}
|
||||
elsif ( $state eq "QUERY" ) {
|
||||
push @$queries, $sql_statement;
|
||||
run_sql($sql_statement);
|
||||
}
|
||||
elsif ( $state eq "PERL" ) {
|
||||
eval($perl_code);
|
||||
@ -262,10 +263,12 @@ while( <TEST> ) {
|
||||
|
||||
# URL to use with curl
|
||||
$line =~ /^\s*URL\s*=\s*(\S.*)$/ && do {
|
||||
$url=$1;
|
||||
$url = $1;
|
||||
$url =~ s{regression.host}{$webhost};
|
||||
$url =~ s{regression_ldap.host}{$ldaphost};
|
||||
$url =~ s{alternate.host}{$althost};
|
||||
|
||||
run_curl($url);
|
||||
};
|
||||
|
||||
|
||||
@ -318,98 +321,111 @@ EOERROR
|
||||
exit (2);
|
||||
}
|
||||
|
||||
push @arguments, @auth;
|
||||
|
||||
if ( -f $datafile ) {
|
||||
push @arguments, "--data-binary", "\@$datafile";
|
||||
}
|
||||
elsif ( defined($data_binary) ) {
|
||||
push @arguments, "--data-binary", $data_binary;
|
||||
}
|
||||
else {
|
||||
undef($datafile);
|
||||
}
|
||||
|
||||
|
||||
if ( defined($url) ) {
|
||||
push @arguments, $url;
|
||||
|
||||
warn join " ", "curl", @arguments, "\n"
|
||||
if $debug;
|
||||
|
||||
open RESULTS, "-|", "curl", @arguments;
|
||||
while( <RESULTS> ) {
|
||||
my $line = $_;
|
||||
foreach my $replacement ( @$replacements ) {
|
||||
$line =~ s/$replacement->{'pattern'}/$replacement->{'replacement'}/;
|
||||
}
|
||||
print $line;
|
||||
}
|
||||
}
|
||||
|
||||
if ( defined($queries) && @{$queries} ) {
|
||||
opendb() unless defined($dbh);
|
||||
print "\n";
|
||||
warn "Processing special queries\n"
|
||||
if $debug;
|
||||
|
||||
foreach $sql_statement ( @$queries ) {
|
||||
# run SQL statement and dump results, into array of hashes
|
||||
my $results = $dbh->selectall_arrayref($sql_statement, { Slice => {} } );
|
||||
|
||||
if ( $dbh->err ) {
|
||||
print $dbh->errstr, "\n";
|
||||
next;
|
||||
} elsif (! defined $results) {
|
||||
print "No results from SQL query\n";
|
||||
next;
|
||||
}
|
||||
|
||||
foreach my $row ( @$results ) {
|
||||
warn "Query result ================================================\n"
|
||||
if $debug;
|
||||
my $sep = "";
|
||||
foreach my $name ( sort keys %$row ) {
|
||||
my $value = $row->{$name};
|
||||
$value = 'NULL' unless ( defined($value) );
|
||||
printf("%17.17s: >%s<\n", $name, $value );
|
||||
}
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($testmode eq 'TAP') {
|
||||
done_testing();
|
||||
}
|
||||
|
||||
exit(0);
|
||||
|
||||
sub run_curl {
|
||||
my $url = shift;
|
||||
|
||||
push @arguments, @auth;
|
||||
|
||||
if ( -f $datafile ) {
|
||||
push @arguments, "--data-binary", "\@$datafile";
|
||||
}
|
||||
elsif ( defined($data_binary) ) {
|
||||
push @arguments, "--data-binary", $data_binary;
|
||||
}
|
||||
else {
|
||||
undef($datafile);
|
||||
}
|
||||
|
||||
push @arguments, $url;
|
||||
|
||||
warn join " ", "curl", @arguments, "\n"
|
||||
if $debug;
|
||||
|
||||
open RESULTS, "-|", "curl", @arguments;
|
||||
while ( <RESULTS> ) {
|
||||
my $line = $_;
|
||||
|
||||
foreach my $replacement ( @$replacements ) {
|
||||
$line =~ s/$replacement->{'pattern'}/$replacement->{'replacement'}/;
|
||||
}
|
||||
|
||||
print $line;
|
||||
}
|
||||
|
||||
print "\n";
|
||||
}
|
||||
|
||||
sub run_sql {
|
||||
my $query = shift;
|
||||
|
||||
print "SQL Query " . $sql_count++ . " Result:\n";
|
||||
|
||||
opendb() unless defined($dbh);
|
||||
|
||||
# run SQL statement and dump results, into array of hashes
|
||||
my $results = $dbh->selectall_arrayref($sql_statement, { Slice => {} } );
|
||||
|
||||
if ( $dbh->err ) {
|
||||
print $dbh->errstr, "\n";
|
||||
return;
|
||||
} elsif (! defined $results) {
|
||||
print "No results from SQL query\n";
|
||||
return;
|
||||
}
|
||||
|
||||
foreach my $row ( @$results ) {
|
||||
warn "Query result ================================================\n"
|
||||
if $debug;
|
||||
my $sep = "";
|
||||
foreach my $name ( sort keys %$row ) {
|
||||
my $value = $row->{$name};
|
||||
$value = 'NULL' unless ( defined($value) );
|
||||
printf("%17.17s: >%s<\n", $name, $value );
|
||||
}
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
=item do_sql( $sql_statement )
|
||||
|
||||
Queries the database using the specified statement and
|
||||
ignores the result.
|
||||
|
||||
=cut
|
||||
|
||||
sub do_sql {
|
||||
my $sql = shift;
|
||||
|
||||
opendb() unless defined($dbh);
|
||||
$dbh->do($sql);
|
||||
|
||||
if ( $dbh->err ) {
|
||||
print $dbh->errstr, "\n";
|
||||
return;
|
||||
}
|
||||
|
||||
print "SQL executed successfully.\n";
|
||||
print $sql, "\n";
|
||||
}
|
||||
|
||||
|
||||
=item get_sql_value( $sql_variable, $sql_values, $sql_statement )
|
||||
|
||||
Queries the database using the specified statement and puts
|
||||
the first column of the first row returned into the
|
||||
hash referenced $sql_values->{$sql_variable} for replacement
|
||||
later in the parsing process.
|
||||
|
||||
=cut
|
||||
|
||||
sub get_sql_value {
|
||||
my $varname = shift;
|
||||
my $values = shift;
|
||||
@ -417,6 +433,7 @@ sub get_sql_value {
|
||||
|
||||
opendb() unless defined($dbh);
|
||||
my $results = $dbh->selectall_arrayref($sql);
|
||||
|
||||
if ( $dbh->err ) {
|
||||
print $dbh->errstr, "\n";
|
||||
return;
|
||||
@ -429,9 +446,11 @@ sub get_sql_value {
|
||||
}
|
||||
|
||||
=item opendb()
|
||||
|
||||
Opens the database connection to the global $dbh handle.
|
||||
Note that the standard PostgreSQL environment variables will also work
|
||||
with DBD::Pg.
|
||||
|
||||
=cut
|
||||
|
||||
sub opendb {
|
||||
@ -493,29 +512,40 @@ those test cases which might require it:
|
||||
The test instructions will include lines defining the test like:
|
||||
=================================================
|
||||
# This is an example
|
||||
URL=http://mycaldav/caldav.php/andrew/
|
||||
HEADER=Depth: 0
|
||||
HEADER=Content-type: text/xml
|
||||
TYPE=PROPFIND
|
||||
|
||||
HEAD
|
||||
|
||||
DATA=OTHERTEST
|
||||
|
||||
URL=http://mycaldav/caldav.php/andrew/
|
||||
|
||||
# This will let you use ##somename## for this value after this
|
||||
GETSQL=somename
|
||||
SELECT column FROM table WHERE criteria
|
||||
ENDSQL
|
||||
|
||||
# The data can be included in line
|
||||
BEGINDATA
|
||||
... data content ...
|
||||
ENDDATA
|
||||
|
||||
# The result could be some SQL output
|
||||
QUERY
|
||||
SELECT something, or, other FROM table ...
|
||||
ENDQUERY
|
||||
|
||||
# Run some Perl code
|
||||
BEGINPERL
|
||||
my \$variable = 'foo';
|
||||
ENDPERL
|
||||
|
||||
REPLACE=/pattern/replacement/
|
||||
=================================================
|
||||
|
||||
URL The URL to request from.
|
||||
URL The URL to request from (request is sent when seen).
|
||||
HEADER An additional header for the request
|
||||
TYPE The type of request (e.g. GET/PUT/POST/REPORT/...)
|
||||
HEAD Whether to include the headers in the recorded response
|
||||
|
||||
@ -30,6 +30,7 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</T:ticketdiscovery>
|
||||
</prop>
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_owner_id: >1003<
|
||||
privileges: >000000000001001011100111<
|
||||
target_collection: >161<
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# MKTICKET request for a ticket on a collection
|
||||
#
|
||||
TYPE=MKTICKET
|
||||
URL=http://regression.host/caldav.php/user2/home/
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
AUTH=user2:user2
|
||||
@ -21,6 +20,12 @@ BEGINDATA
|
||||
</D:ticketinfo>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!
|
||||
REPLACE=!<T:id>\S{8}</T:id>!<T:id>Good Ticket ID</T:id>!
|
||||
REPLACE=!Ticket: \S{8}!Ticket:Good Ticket ID!
|
||||
|
||||
URL=http://regression.host/caldav.php/user2/home/
|
||||
|
||||
QUERY
|
||||
SELECT dav_owner_id,
|
||||
(expires - current_timestamp)::interval(0) AS timeout,
|
||||
@ -29,7 +34,3 @@ SELECT dav_owner_id,
|
||||
target_resource_id
|
||||
FROM access_ticket
|
||||
ENDQUERY
|
||||
|
||||
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!
|
||||
REPLACE=!<T:id>\S{8}</T:id>!<T:id>Good Ticket ID</T:id>!
|
||||
REPLACE=!Ticket: \S{8}!Ticket:Good Ticket ID!
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bound_source_id: >161<
|
||||
dav_displayname: >User 2's Calendar, as uploaded by Admin<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# also applying a ticket during the bind
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
# Get the ticket we created earlier in 999...
|
||||
@ -27,6 +26,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -10,6 +10,7 @@ Content-Type: text/xml; charset="utf-8"
|
||||
<can-overwrite/>A resource already exists at the destination.
|
||||
</error>
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bound_source_id: >161<
|
||||
dav_displayname: >User 2's Calendar, as uploaded by Admin<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# also applying a ticket during the bind
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
# Get the ticket we created earlier in 999...
|
||||
@ -26,6 +25,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -119,3 +119,4 @@
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# PROPFIND on a collection which we have bound into user4's home
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: BIND Spec Tests
|
||||
@ -24,3 +23,5 @@ ENDDATA
|
||||
# <current-user-privilege-set/>
|
||||
|
||||
REPLACE=_resources/\d+_resources/XX_
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
|
||||
@ -261,3 +261,4 @@
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# PROPFIND on a collection which we have bound into user4's home
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: BIND Spec Tests
|
||||
@ -22,3 +21,4 @@ BEGINDATA
|
||||
</propfind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
|
||||
@ -141,3 +141,4 @@ END:VCALENDAR
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Test multiget REPORT access to a bound calendar
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
AUTH=user4:user4
|
||||
|
||||
|
||||
@ -24,3 +23,4 @@ BEGINDATA
|
||||
</calendar-multiget>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
|
||||
@ -87,3 +87,4 @@
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# PROPFIND on a collection which we have bound into user4's home
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: BIND Spec Tests
|
||||
@ -21,3 +20,4 @@ BEGINDATA
|
||||
</propfind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
|
||||
@ -40,3 +40,4 @@ RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=4
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
END:VCALENDAR
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Test GET access to a bound calendar
|
||||
#
|
||||
TYPE=GET
|
||||
URL=http://regression.host/caldav.php/user4/user2/33169d69-2969-4a96-a3e1-2e312b7614e6.ics
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
@ -11,6 +10,4 @@ HEAD
|
||||
BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
|
||||
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/user2/33169d69-2969-4a96-a3e1-2e312b7614e6.ics
|
||||
|
||||
@ -215,3 +215,4 @@ END:VCALENDAR
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Test REPORT access to a bound calendar using a ticket.
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
@ -27,3 +26,4 @@ BEGINDATA
|
||||
</calendar-query>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
|
||||
@ -20,8 +20,10 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
SQL Query 2 Result:
|
||||
property_name: >http://xmlns.dotcal.com/dotcal:icon_uri<
|
||||
property_value: >http://eventful.com/favicon.ico<
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Test PROPPATCH to change the displayname on a bind
|
||||
#
|
||||
TYPE=PROPPATCH
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
@ -22,6 +21,8 @@ BEGINDATA
|
||||
</propertyupdate>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
|
||||
QUERY
|
||||
SELECT dav_displayname FROM dav_binding WHERE dav_name = '/user4/user2/'
|
||||
ENDQUERY
|
||||
|
||||
@ -26,5 +26,6 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Test PROPPATCH to change the displayname on a bind
|
||||
#
|
||||
TYPE=PROPPATCH
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
@ -22,6 +21,8 @@ BEGINDATA
|
||||
</propertyupdate>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
|
||||
QUERY
|
||||
SELECT dav_displayname FROM dav_binding WHERE dav_name = '/user4/user2/'
|
||||
ENDQUERY
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bound_source_id: >161<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# also applying a ticket during the bind
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
# Get the ticket we created earlier in 999...
|
||||
@ -26,6 +25,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_etag: >9a8d7696ee2e0a0f1f4170fe4f094a3a<
|
||||
dav_name: >/user2/home/thiswillworkfine.ics<
|
||||
dtstart: >2010-03-22 18:00:00+13<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# the binding does confer write privileges
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user4/user2/thiswillworkfine.ics
|
||||
|
||||
HEADER=Content-Type: text/calendar; charset=utf-8
|
||||
AUTH=user4:user4
|
||||
@ -46,6 +45,8 @@ END:VEVENT
|
||||
END:VCALENDAR
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/user2/thiswillworkfine.ics
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag, dtstart, summary
|
||||
FROM caldav_data JOIN calendar_item USING(dav_name)
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_etag: >9a8d7696ee2e0a0f1f4170fe4f094a3a<
|
||||
dav_name: >/user1/home/thiswillnotwork.ics<
|
||||
dtstart: >2010-03-22 18:00:00+13<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# the binding does not confer write privileges
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user4/user1/thiswillnotwork.ics
|
||||
|
||||
HEADER=Content-Type: text/calendar; charset=utf-8
|
||||
AUTH=user4:user4
|
||||
@ -46,6 +45,8 @@ END:VEVENT
|
||||
END:VCALENDAR
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/user1/thiswillnotwork.ics
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag, dtstart, summary
|
||||
FROM caldav_data JOIN calendar_item USING(dav_name)
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_displayname: >A normal collection<
|
||||
is_addressbook: >0<
|
||||
is_calendar: >0<
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Extended MKCOL test - Normal collection to create off a principal-URL
|
||||
#
|
||||
TYPE=MKCOL
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
HEADER=Content-Type: text/xml
|
||||
AUTH=user4:user4
|
||||
HEAD
|
||||
@ -19,6 +18,7 @@ BEGINDATA
|
||||
</mkcol>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
|
||||
QUERY
|
||||
SELECT user_no, parent_container, dav_displayname,
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_displayname: >A normal collection<
|
||||
dav_name: >/user4/base/<
|
||||
is_addressbook: >0<
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Extended MKCOL test - Sub collection to create off a normal collection
|
||||
#
|
||||
TYPE=MKCOL
|
||||
URL=http://regression.host/caldav.php/user4/base/calendar/
|
||||
HEADER=Content-Type: text/xml
|
||||
AUTH=user4:user4
|
||||
HEAD
|
||||
@ -26,6 +25,7 @@ BEGINDATA
|
||||
</mkcol>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/calendar/
|
||||
|
||||
QUERY
|
||||
SELECT user_no, parent_container, dav_displayname, dav_name,
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bound_source_id: >161<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# also applying a ticket during the bind
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
AUTH=user4:user4
|
||||
|
||||
# Get the ticket we created earlier in 999...
|
||||
@ -26,6 +25,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bound_source_id: >161<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# also applying a ticket during the bind
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
AUTH=user4:user4
|
||||
|
||||
# Get the ticket we created earlier in 999...
|
||||
@ -26,6 +25,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -10,6 +10,7 @@ Content-Type: text/xml; charset="utf-8"
|
||||
<can-overwrite/>A resource already exists at the destination.
|
||||
</error>
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bound_source_id: >161<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# also applying a ticket during the bind
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
AUTH=user4:user4
|
||||
|
||||
# Get the ticket we created earlier in 999...
|
||||
@ -26,6 +25,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -75,3 +75,4 @@
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# PROPFIND on a collection in which we have binds & collections
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: BIND Spec Tests
|
||||
@ -23,3 +22,5 @@ BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
# <current-user-privilege-set/>
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_etag: >1c7895f11787e71fd6dbe3260d72d4a0<
|
||||
dav_name: >/user2/home/thiswillalsobegood.ics<
|
||||
dtstart: >2004-01-01 12:00:00+13<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# the binding does confer write privileges
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user4/base/user2/thiswillalsobegood.ics
|
||||
|
||||
HEADER=Content-Type: text/calendar; charset=utf-8
|
||||
AUTH=user4:user4
|
||||
@ -45,6 +44,8 @@ END:VTODO
|
||||
END:VCALENDAR
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/user2/thiswillalsobegood.ics
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag, dtstart, summary
|
||||
FROM caldav_data JOIN calendar_item USING(dav_name)
|
||||
|
||||
@ -22,3 +22,4 @@
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
# In this case we're doing Depth: 0
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: BIND Spec Tests
|
||||
@ -25,3 +24,5 @@ BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
# <current-user-privilege-set/>
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
|
||||
@ -26,3 +26,4 @@
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
# In this case we're doing Depth: 0 on the principal
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: BIND Spec Tests
|
||||
@ -26,3 +25,5 @@ BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
# <current-user-privilege-set/>
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
|
||||
@ -9,11 +9,13 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_etag: >ea6b316ca24db20f5eb37d1abd60f8c1<
|
||||
dav_name: >/user4/base/calendar/anothergoodleopard.ics<
|
||||
dtstart: >2010-03-22 16:00:00+13<
|
||||
summary: >An invited event. Black tie with pink polka dots is essential. Do not bring a leopard. Any leopards which do attend will be forcibly chained to a nearby fence.<
|
||||
|
||||
SQL Query 2 Result:
|
||||
created: >2010-03-19 10:32:47<
|
||||
dav_name: >/user4/base/calendar/anothergoodleopard.ics<
|
||||
dtstamp: >2010-03-19 10:56:20<
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Attempt to put an event into a calendar within a collection in their normal home
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user4/base/calendar/anothergoodleopard.ics
|
||||
|
||||
HEADER=Content-Type: text/calendar; charset=utf-8
|
||||
AUTH=user4:user4
|
||||
@ -45,6 +44,8 @@ END:VEVENT
|
||||
END:VCALENDAR
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/calendar/anothergoodleopard.ics
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag, dtstart, summary
|
||||
FROM caldav_data JOIN calendar_item USING(dav_name)
|
||||
|
||||
@ -6,6 +6,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_etag: >d7773e205d1992a23af9840dcf944e3b<
|
||||
dav_name: >/user4/base/newcalendar/12cbff90-0f8a-012d-1259-002421a2359e.ics<
|
||||
dtstart: >2010-07-11 11:00:00+12<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# the binding does confer write privileges
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user4/base/newcalendar/
|
||||
|
||||
HEADER=Content-Type: text/calendar; charset=utf-8
|
||||
AUTH=user4:user4
|
||||
@ -184,6 +183,8 @@ END:VEVENT
|
||||
END:VCALENDAR
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/newcalendar/
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag, dtstart, summary
|
||||
FROM caldav_data JOIN calendar_item USING(dav_name)
|
||||
|
||||
@ -30,6 +30,7 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</T:ticketdiscovery>
|
||||
</prop>
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_name: >/user3/home/<
|
||||
dav_owner_id: >1<
|
||||
privileges: >000000000001001011100111<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# - ticket should have no expiry
|
||||
#
|
||||
TYPE=MKTICKET
|
||||
URL=http://regression.host/caldav.php/user3/home/
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
HEAD
|
||||
@ -17,6 +16,12 @@ BEGINDATA
|
||||
</T:ticketinfo>
|
||||
ENDDATA
|
||||
|
||||
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!
|
||||
REPLACE=!<T:id>\S{8}</T:id>!<T:id>Good Ticket ID</T:id>!
|
||||
REPLACE=!Ticket: \S{8}!Ticket:Good Ticket ID!
|
||||
|
||||
URL=http://regression.host/caldav.php/user3/home/
|
||||
|
||||
QUERY
|
||||
SELECT access_ticket.dav_owner_id,
|
||||
date_trunc( 'minute', ('55 seconds' + access_ticket.expires - current_timestamp)::interval(0)) AS timeout,
|
||||
@ -29,7 +34,3 @@ SELECT access_ticket.dav_owner_id,
|
||||
WHERE collection.dav_name = '/user3/home/'
|
||||
ENDQUERY
|
||||
# WHERE target_collection = 161
|
||||
|
||||
REPLACE=!ETag: "\S+"!ETag: "Some good etag"!
|
||||
REPLACE=!<T:id>\S{8}</T:id>!<T:id>Good Ticket ID</T:id>!
|
||||
REPLACE=!Ticket: \S{8}!Ticket:Good Ticket ID!
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bind_owner: >1005<
|
||||
bound_source_id: >161<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# also applying a ticket during the bind
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
AUTH=admin:nimda
|
||||
|
||||
# Get the ticket we created earlier in 999...
|
||||
@ -26,6 +25,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -20,8 +20,10 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_displayname: >Updated user4-base-user3 displayname with PROPPATCH<
|
||||
|
||||
SQL Query 2 Result:
|
||||
property_name: >http://xmlns.dotcal.com/dotcal:icon_uri<
|
||||
property_value: >http://eventful.com/favicon.ico<
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Test PROPPATCH to change the displayname on a bind
|
||||
#
|
||||
TYPE=PROPPATCH
|
||||
URL=http://regression.host/caldav.php/user4/base/user3/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
@ -22,6 +21,8 @@ BEGINDATA
|
||||
</propertyupdate>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/user3/
|
||||
|
||||
QUERY
|
||||
SELECT dav_displayname FROM dav_binding WHERE dav_name = '/user4/base/user3/'
|
||||
ENDQUERY
|
||||
|
||||
@ -4,6 +4,7 @@ DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
|
||||
DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1026<
|
||||
bound_source_id: >160<
|
||||
dav_displayname: >user1 home<
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
#
|
||||
# Do a DELETE on a BIND
|
||||
TYPE=DELETE
|
||||
URL=http://regression.host/caldav.php/user4/base/user3/
|
||||
AUTH=user4:user4
|
||||
HEAD
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/user3/
|
||||
|
||||
QUERY
|
||||
SELECT dav_name, bind_id, bound_source_id, dav_owner_id, parent_container, dav_displayname
|
||||
FROM dav_binding
|
||||
|
||||
@ -328,3 +328,4 @@ RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
END:VCALENDAR
|
||||
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
#
|
||||
|
||||
TYPE=GET
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
HEAD
|
||||
|
||||
AUTH=user4:user4
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
|
||||
@ -91,3 +91,4 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</response>
|
||||
<sync-token>data:,6</sync-token>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# on a bound resource
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
HEADER=User-agent: sync-collection initial REPORT
|
||||
HEADER=Content-type: text/xml
|
||||
HEAD
|
||||
@ -21,3 +20,4 @@ BEGINDATA
|
||||
</D:sync-collection>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/user2/
|
||||
|
||||
@ -127,3 +127,4 @@
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -3,14 +3,12 @@
|
||||
# - ctag returned
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: BIND Spec Tests
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
HEADER=Depth: 2
|
||||
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<D:propfind xmlns:D="DAV:" xmlns:cs="http://calendarserver.org/ns/">
|
||||
@ -21,3 +19,5 @@ BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
REPLACE=_<C:getctag>"[0-9a-f]+"</C:getctag>_<C:getctag>"XX"</C:getctag>_
|
||||
|
||||
URL=http://regression.host/caldav.php
|
||||
|
||||
@ -208,3 +208,4 @@
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
# - ctag returned
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user4
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: BIND Spec Tests
|
||||
@ -20,3 +19,4 @@ BEGINDATA
|
||||
</D:propfind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4
|
||||
|
||||
@ -5,4 +5,4 @@ DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
|
||||
Content-Length: 19
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
Resource Not Found.
|
||||
Resource Not Found.
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
#
|
||||
|
||||
TYPE=GET
|
||||
URL=http://regression.host/caldav.php/
|
||||
HEAD
|
||||
|
||||
AUTH=user4:user4
|
||||
|
||||
URL=http://regression.host/caldav.php/
|
||||
|
||||
@ -22,3 +22,4 @@ UID:ignore_uid
|
||||
CREATED:20100319T103247Z
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
#
|
||||
|
||||
TYPE=GET
|
||||
URL=http://regression.host/caldav.php/user3
|
||||
HEAD
|
||||
|
||||
AUTH=user1:user1
|
||||
|
||||
REPLACE=/^UID:.*/UID:ignore_uid/
|
||||
|
||||
URL=http://regression.host/caldav.php/user3
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bound_source_id: >161<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
# to contain two bindings and a collection
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
@ -26,6 +25,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -97,3 +97,4 @@
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
# In this case we're doing Depth: 0
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: BIND Spec Tests
|
||||
@ -25,3 +24,5 @@ BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
# <current-user-privilege-set/>
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/base/
|
||||
|
||||
@ -110,3 +110,4 @@
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
# In this case we're doing Depth: 0
|
||||
#
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/user4/boundbase/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: BIND Spec Tests
|
||||
@ -25,3 +24,5 @@ BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
# <current-user-privilege-set/>
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/boundbase/
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bound_source_id: >161<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
# to contain two bindings and a collection
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
@ -26,6 +25,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bound_source_id: >161<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
# appear to contain two bindings and a collection
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
@ -27,6 +26,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1020<
|
||||
bound_source_id: >161<
|
||||
dav_displayname: >Updated Displayname with PROPPATCH<
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
# appear to contain two bindings and a collection
|
||||
#
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: Ticket Spec Tests
|
||||
@ -27,6 +26,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user4/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -6,6 +6,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
bind_id: >1058<
|
||||
bound_source_id: >1057<
|
||||
dav_displayname: >Moon<
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
#
|
||||
|
||||
TYPE=BIND
|
||||
URL=http://regression.host/caldav.php/teamclient1/
|
||||
AUTH=admin:nimda
|
||||
|
||||
HEADER=User-Agent: Test external bind
|
||||
@ -20,6 +19,8 @@ BEGINDATA
|
||||
</bind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/teamclient1/
|
||||
|
||||
QUERY
|
||||
SELECT bind_id,
|
||||
bound_source_id,
|
||||
|
||||
@ -943,3 +943,4 @@ DESCRIPTION:Vollmond um 23:25 (CET)
|
||||
UID:mooncal-20260201Z-fullmoon
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
#
|
||||
|
||||
TYPE=GET
|
||||
URL=http://regression.host/caldav.php/teamclient1/Moon
|
||||
AUTH=user1:user1
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
@ -13,3 +12,5 @@ HEAD
|
||||
|
||||
BEGINDATA
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/teamclient1/Moon
|
||||
|
||||
@ -485,3 +485,4 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
#
|
||||
|
||||
TYPE=PROPFIND
|
||||
URL=http://regression.host/caldav.php/teamclient1
|
||||
AUTH=user1:user1
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
@ -60,3 +59,5 @@ BEGINDATA
|
||||
</A:prop>
|
||||
</A:propfind>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/teamclient1
|
||||
|
||||
@ -14,9 +14,10 @@ ok 6 - Correct status message is present
|
||||
ok 7 - Binding is present
|
||||
ok 8 - Submit updated fields
|
||||
ok 9 - Correct error message is present
|
||||
|
||||
SQL Query 1 Result:
|
||||
count: >0<
|
||||
|
||||
SQL Query 2 Result:
|
||||
bind_id: >1192<
|
||||
bound_source_id: >1057<
|
||||
dav_displayname: >Moon Phases - user3<
|
||||
|
||||
@ -7,6 +7,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
dav_displayname: >User 1's Addresses<
|
||||
is_addressbook: >1<
|
||||
is_calendar: >0<
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# Extended MKCOL test - create an addressbook
|
||||
#
|
||||
TYPE=MKCOL
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/xml
|
||||
HEADER=X-DAViCal-Flush-Cache: true
|
||||
@ -25,6 +24,7 @@ BEGINDATA
|
||||
</mkcol>
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/
|
||||
|
||||
QUERY
|
||||
SELECT user_no, parent_container, dav_displayname,
|
||||
|
||||
@ -10,3 +10,4 @@ Content-Type: text/xml; charset="utf-8"
|
||||
<collection-must-exist/>The destination collection does not exist
|
||||
</error>
|
||||
|
||||
SQL Query 1 Result:
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# PUT a VCARD record into a non-existing addressbook
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user1/addressbook1/kelly.vcf
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/vcard; charset=utf-8
|
||||
@ -24,6 +23,8 @@ version:2.1
|
||||
end:vcard
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user1/addressbook1/kelly.vcf
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag, fn, n
|
||||
FROM caldav_data JOIN addressbook_resource USING(dav_id)
|
||||
|
||||
@ -10,3 +10,4 @@ Content-Type: text/xml; charset="utf-8"
|
||||
<urn:ietf:params:xml:ns:carddav:supported-address-data/>Incorrect content type for addressbook: text/plain
|
||||
</error>
|
||||
|
||||
SQL Query 1 Result:
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# PUT arbitrary text into a collection (in this case an addressbook)
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/strumar_and_beren.txt
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/plain; charset=utf-8
|
||||
@ -15,6 +14,8 @@ quite as old as he was now, and Beren had not always been this white,
|
||||
either.
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/strumar_and_beren.txt
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag
|
||||
FROM caldav_data
|
||||
|
||||
@ -6,6 +6,7 @@ Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
SQL Query 1 Result:
|
||||
caladruri: >mailto:andrew@morphoss.com<
|
||||
caluri: >https://dotcal.com/karora<
|
||||
dav_etag: >a81fa8394d866e6037ea426554663e4c<
|
||||
@ -20,6 +21,7 @@ Content-Type: text/plain; charset="utf-8"
|
||||
url: >http://andrew.mcmillan.net.nz/<
|
||||
version: >3.0<
|
||||
|
||||
SQL Query 2 Result:
|
||||
box_no: ><
|
||||
country: >New Zealand<
|
||||
locality: >Porikana<
|
||||
@ -30,6 +32,7 @@ Content-Type: text/plain; charset="utf-8"
|
||||
type: >HOME<
|
||||
unit_no: ><
|
||||
|
||||
SQL Query 3 Result:
|
||||
tel: >+64 22 123 4567<
|
||||
type: >WORK,VOICE<
|
||||
|
||||
@ -39,6 +42,7 @@ Content-Type: text/plain; charset="utf-8"
|
||||
tel: >+64 22 123 4567<
|
||||
type: >CELL<
|
||||
|
||||
SQL Query 4 Result:
|
||||
email: >andrew@morphoss.com<
|
||||
type: >WORK<
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# PUT a VCARD record into an addressbook
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/andrew_mcmillan.vcf
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/vcard; charset=utf-8
|
||||
@ -46,6 +45,8 @@ URL:http://andrew.mcmillan.net.nz/
|
||||
END:VCARD
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user1/addressbook/andrew_mcmillan.vcf
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag,
|
||||
version, uid, nickname, fn, n, note, org, url, fburl, caladruri, caluri
|
||||
|
||||
@ -6,3 +6,4 @@ Content-Length: 59
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
A DAViCal principal collection may only contain collections
|
||||
SQL Query 1 Result:
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
# PUT an arbitrary text file into a principal collection.
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://regression.host/caldav.php/user1/strumar_and_beren_also.txt
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/plain; charset=utf-8
|
||||
@ -15,6 +14,8 @@ quite as old as he was now, and Beren had not always been this white,
|
||||
either.
|
||||
ENDDATA
|
||||
|
||||
URL=http://regression.host/caldav.php/user1/strumar_and_beren_also.txt
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.dav_name, caldav_data.dav_etag
|
||||
FROM caldav_data
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user