apple / ccs-caldavtester

CalDAV/CardDAV Testing Framework used by CalendarServer
https://www.calendarserver.org
Apache License 2.0
57 stars 36 forks source link

Changes to test suite #19

Open macosforgebot opened 11 years ago

macosforgebot commented 11 years ago

douglm@… originally submitted this as ticket:517


These are notes I took while getting the current version of the test suite to work with bedework.

I've zipped up a copy of most of the affected files.

Added this after line 54 in propfindItems.py - I think it dealt with errors that caused exceptions - produced more useful messages

            if value is None:
                    return False, "           Could not parse XML value: None"

            if value == "":
                    return False, "           Could not parse XML value: zero len"

Where there were delays in the tests they were sometimes not long enough. I added a variable to the server config and used that. It's probably over-long

       <!-- delay inserted (usually after PUT) to allow background scheduling
             processes to run -->
        <substitution>
            <key>$schedDelay:</key>
            <value>14</value>
        </substitution>

Added/changed some delays (used token to set delay length) to

implicitscenario1.xml
implicitallday.xml
implicitauto1.xml
implicitauto3.xml
implicitauto6.xml
implicitcancels.xml
implicitcompatibility.xml
implicitdeletecalendar.xml
implicitrecur1.xml
implicitscenario2.xml
implicitscheduleagent.xml
implicitscheduletag.xml
implicitsecurity.xml
implicittimezones.xml
implicittodo.xml

In reports.xml I'd previously added a load of DEPTH: 1 headers - they may be needed again. Note done yet.


Running all the tests leads to a lot of failures. Turns out user02 is left with a read only privilege on the home which affects everything below it. acl.xml doesn't clean up user2 home afterwards.

Added

    <request user="$userid2:" pswd="$pswd2:">
        <method>ACL</method>
        <ruri>$calendarhome2:/</ruri>
        <data>
            <content-type>text/xml; charset=utf-8</content-type>
            <filepath>Resource/CalDAV/acls/99.xml</filepath>
        </data>
    </request>

to the end stuff with 99.xml being

<?xml version="1.0" encoding="utf-8" ?>
<D:acl xmlns:D="DAV:" >
    <D:ace>
        <D:principal>
            <D:property><D:owner/></D:property>
        </D:principal>
        <D:grant>
            <D:privilege><D:all/></D:privilege>
        </D:grant>
    </D:ace>
    <D:ace>
        <D:principal>
            <D:href>$principaluri2:</D:href>
        </D:principal>
        <D:grant>
            <D:privilege><D:all/></D:privilege>
        </D:grant>
    </D:ace>
</D:acl>

Not altogether what I want but deals with the issue.

macosforgebot commented 11 years ago

douglm@… originally submitted this as attachment:CalDAVtests.zip:⁠ticket:517


Zipped up test files and a resource file

macosforgebot commented 10 years ago

@wsanchez originally submitted this as comment:6:⁠ticket:517