[prev in list] [next in list] [prev in thread] [next in thread] 

List:       calendarserver-changes
Subject:    [CalendarServer-changes] [15462] CalDAVTester/trunk
From:       source_changes () macosforge ! org
Date:       2016-02-15 16:02:00
Message-ID: 20160215160201.0C57B140E6A () svn ! calendarserver ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Revision: 15462
          http://trac.calendarserver.org//changeset/15462
Author:   cdaboo@apple.com
Date:     2016-02-15 08:02:00 -0800 (Mon, 15 Feb 2016)
Log Message:
-----------
Tests for invalid vcards during simple/crud bulk create requests.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml
    CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf

Added: CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml	                        \
                (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml	2016-02-15 16:02:00 UTC \
(rev 15462) @@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<MM:multiput xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav"  \
xmlns:MM="http://me.com/_namespace/"> +<MM:resource>
+<D:set>
+<C:address-data><![CDATA[BEGIN:VCARD
+VERSION:3.0
+N:01;User;;;
+FN:User 01
+EMAIL;type=INTERNET;type=WORK;type=pref:user01@example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+ADR;type=WORK;type=pref:;;1245 Test;Happy House
+Sesame Street;California;11111;USA
+UID:user01-uid08
+END:VCARD
+]]>
+</C:address-data>
+</D:set>
+</MM:resource>
+</MM:multiput>

Added: CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf
===================================================================
--- CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf	                        \
                (rev 0)
+++ CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf	2016-02-15 16:02:00 UTC \
(rev 15462) @@ -0,0 +1,11 @@
+BEGIN:VCARD
+VERSION:3.0
+N:01;User;;;
+FN:User 01
+EMAIL;type=INTERNET;type=WORK;type=pref:user01@example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+ADR;type=WORK;type=pref:;;1245 Test;Happy House
+Sesame Street;California;11111;USA
+UID:user01-uid15
+END:VCARD

Modified: CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml	2016-02-08 19:11:11 UTC (rev \
                15461)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml	2016-02-15 16:02:00 UTC (rev \
15462) @@ -713,6 +713,27 @@
 		</test>
 	</test-suite>
 	
+	<test-suite name='Simple POST - bad vcard'>
+		<test name='1'>
+			<description>POST single bad vcard</description>
+			<request>
+				<method>POST</method>
+				<ruri>$addressbookpath1:/</ruri>
+				<data>
+					<content-type>text/vcard; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/bulk/simple/15.vcf</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+					<arg>
+						<name>status</name>
+						<value>400</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
 	<test-suite name='CRUD POST - one vcard create'>
 		<test name='1'>
 			<description>POST single new vcard</description>
@@ -1511,6 +1532,27 @@
 		</test>
 	</test-suite>
 	
+	<test-suite name='CRUD POST - bad vcard'>
+		<test name='1'>
+			<description>POST single new vcard</description>
+			<request>
+				<method>POST</method>
+				<ruri>$addressbookpath1:/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/CardDAV/bulk/crud-one/8.xml</filepath>
+				</data>
+				<verify>
+					<callback>xmlElementMatch</callback>
+					<arg>
+						<name>exists</name>
+						<value>$verify-bad-response:[*400]</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+	
 	<end/>
 	
 </caldavtest>


[Attachment #5 (text/html)]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[15462] CalDAVTester/trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: \
verdana,arial,helvetica,sans-serif; font-size: 10pt;  } #msg dl a { font-weight: \
bold} #msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: \
bold; } #msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: \
6px; } #logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em \
0; } #logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg \
h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; } \
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; \
} #logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: \
-1.5em; padding-left: 1.5em; } #logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em \
1em 0 1em; background: white;} #logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid \
#fa0; border-bottom: 1px solid #fa0; background: #fff; } #logmsg table th { \
text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted \
#fa0; } #logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: \
0.2em 0.5em; } #logmsg table thead th { text-align: center; border-bottom: 1px solid \
#fa0; } #logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: \
6px; } #patch { width: 100%; }
#patch h4 {font-family: \
verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
 #patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, \
#patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch ins \
{background:#dfd;text-decoration:none;display:block;padding:0 10px;} #patch del \
{background:#fdd;text-decoration:none;display:block;padding:0 10px;} #patch .lines, \
                .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a \
href="http://trac.calendarserver.org//changeset/15462">15462</a></dd> <dt>Author</dt> \
<dd>cdaboo@apple.com</dd> <dt>Date</dt> <dd>2016-02-15 08:02:00 -0800 (Mon, 15 Feb \
2016)</dd> </dl>

<h3>Log Message</h3>
<pre>Tests for invalid vcards during simple/crud bulk create requests.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalDAVTestertrunkscriptstestsCardDAVbulkxml">CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml</a></li>
 </ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#CalDAVTestertrunkResourceCardDAVbulkcrudone8xml">CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml</a></li>
 <li><a href="#CalDAVTestertrunkResourceCardDAVbulksimple15vcf">CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf</a></li>
 </ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalDAVTestertrunkResourceCardDAVbulkcrudone8xml"></a>
<div class="addfile"><h4>Added: \
CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml (0 => 15462)</h4> <pre \
class="diff"><span> <span class="info">--- \
CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml	                        (rev \
                0)
+++ CalDAVTester/trunk/Resource/CardDAV/bulk/crud-one/8.xml	2016-02-15 16:02:00 UTC \
(rev 15462) </span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
+&lt;MM:multiput xmlns:D=&quot;DAV:&quot; \
xmlns:C=&quot;urn:ietf:params:xml:ns:carddav&quot;  \
xmlns:MM=&quot;http://me.com/_namespace/&quot;&gt; +&lt;MM:resource&gt;
+&lt;D:set&gt;
+&lt;C:address-data&gt;&lt;![CDATA[BEGIN:VCARD
+VERSION:3.0
+N:01;User;;;
+FN:User 01
+EMAIL;type=INTERNET;type=WORK;type=pref:user01@example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+ADR;type=WORK;type=pref:;;1245 Test;Happy House
+Sesame Street;California;11111;USA
+UID:user01-uid08
+END:VCARD
+]]&gt;
+&lt;/C:address-data&gt;
+&lt;/D:set&gt;
+&lt;/MM:resource&gt;
+&lt;/MM:multiput&gt;
</ins></span></pre></div>
<a id="CalDAVTestertrunkResourceCardDAVbulksimple15vcf"></a>
<div class="addfile"><h4>Added: \
CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf (0 => 15462)</h4> <pre \
class="diff"><span> <span class="info">--- \
CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf	                        (rev \
                0)
+++ CalDAVTester/trunk/Resource/CardDAV/bulk/simple/15.vcf	2016-02-15 16:02:00 UTC \
(rev 15462) </span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+BEGIN:VCARD
+VERSION:3.0
+N:01;User;;;
+FN:User 01
+EMAIL;type=INTERNET;type=WORK;type=pref:user01@example.com
+TEL;type=WORK;type=pref:1-555-555-5555
+TEL;type=CELL:1-444-444-4444
+ADR;type=WORK;type=pref:;;1245 Test;Happy House
+Sesame Street;California;11111;USA
+UID:user01-uid15
+END:VCARD
</ins></span></pre></div>
<a id="CalDAVTestertrunkscriptstestsCardDAVbulkxml"></a>
<div class="modfile"><h4>Modified: CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml \
(15461 => 15462)</h4> <pre class="diff"><span>
<span class="info">--- CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml	2016-02-08 \
                19:11:11 UTC (rev 15461)
+++ CalDAVTester/trunk/scripts/tests/CardDAV/bulk.xml	2016-02-15 16:02:00 UTC (rev \
15462) </span><span class="lines">@@ -713,6 +713,27 @@
</span><span class="cx"> 		&lt;/test&gt;
</span><span class="cx"> 	&lt;/test-suite&gt;
</span><span class="cx"> 	
</span><ins>+	&lt;test-suite name='Simple POST - bad vcard'&gt;
+		&lt;test name='1'&gt;
+			&lt;description&gt;POST single bad vcard&lt;/description&gt;
+			&lt;request&gt;
+				&lt;method&gt;POST&lt;/method&gt;
+				&lt;ruri&gt;$addressbookpath1:/&lt;/ruri&gt;
+				&lt;data&gt;
+					&lt;content-type&gt;text/vcard; charset=utf-8&lt;/content-type&gt;
+					&lt;filepath&gt;Resource/CardDAV/bulk/simple/15.vcf&lt;/filepath&gt;
+				&lt;/data&gt;
+				&lt;verify&gt;
+					&lt;callback&gt;statusCode&lt;/callback&gt;
+					&lt;arg&gt;
+						&lt;name&gt;status&lt;/name&gt;
+						&lt;value&gt;400&lt;/value&gt;
+					&lt;/arg&gt;
+				&lt;/verify&gt;
+			&lt;/request&gt;
+		&lt;/test&gt;
+	&lt;/test-suite&gt;
+
</ins><span class="cx"> 	&lt;test-suite name='CRUD POST - one vcard create'&gt;
</span><span class="cx"> 		&lt;test name='1'&gt;
</span><span class="cx"> 			&lt;description&gt;POST single new \
vcard&lt;/description&gt; </span><span class="lines">@@ -1511,6 +1532,27 @@
</span><span class="cx"> 		&lt;/test&gt;
</span><span class="cx"> 	&lt;/test-suite&gt;
</span><span class="cx"> 	
</span><ins>+	&lt;test-suite name='CRUD POST - bad vcard'&gt;
+		&lt;test name='1'&gt;
+			&lt;description&gt;POST single new vcard&lt;/description&gt;
+			&lt;request&gt;
+				&lt;method&gt;POST&lt;/method&gt;
+				&lt;ruri&gt;$addressbookpath1:/&lt;/ruri&gt;
+				&lt;data&gt;
+					&lt;content-type&gt;text/xml; charset=utf-8&lt;/content-type&gt;
+					&lt;filepath&gt;Resource/CardDAV/bulk/crud-one/8.xml&lt;/filepath&gt;
+				&lt;/data&gt;
+				&lt;verify&gt;
+					&lt;callback&gt;xmlElementMatch&lt;/callback&gt;
+					&lt;arg&gt;
+						&lt;name&gt;exists&lt;/name&gt;
+						&lt;value&gt;$verify-bad-response:[*400]&lt;/value&gt;
+					&lt;/arg&gt;
+				&lt;/verify&gt;
+			&lt;/request&gt;
+		&lt;/test&gt;
+	&lt;/test-suite&gt;
+	
</ins><span class="cx"> 	&lt;end/&gt;
</span><span class="cx"> 	
</span><span class="cx"> &lt;/caldavtest&gt;
</span></span></pre>
</div>
</div>

</body>
</html>



_______________________________________________
calendarserver-changes mailing list
calendarserver-changes@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/calendarserver-changes


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic