- Create test_cloud_provider_contract.py with parametrized suite for Nextcloud, WebDAV, Google Drive, OneDrive - Assert canonical (connection_id, user_id, parent_ref=None, page_token=None) signature, CloudListing return type, trusted caller identity propagation, metadata normalization, pagination completeness, and forbidden-operation spies - Add synthetic credential-free fixtures: nextcloud_root.xml, webdav_root.xml, google_drive_pages.json, onedrive_pages.json - 9 tests fail for nextcloud (expected RED state — incompatible list_folder override) - All webdav, google_drive, onedrive contract tests pass
165 lines
5.7 KiB
XML
165 lines
5.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Synthetic Nextcloud Depth-1 PROPFIND fixture — no real credentials, hostnames, tokens, or user data.
|
|
Root path: /remote.php/dav/files/testuser/
|
|
Represents: 4 folders + 6 files directly in root.
|
|
Covers: root self-entry filtering, absolute hrefs, encoded spaces/unicode, missing optional props.
|
|
-->
|
|
<d:multistatus xmlns:d="DAV:" xmlns:nc="http://nextcloud.org/ns" xmlns:oc="http://owncloud.org/ns">
|
|
|
|
<!-- Root self-entry — MUST be filtered out by the parser -->
|
|
<d:response>
|
|
<d:href>/remote.php/dav/files/testuser/</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype><d:collection/></d:resourcetype>
|
|
<d:displayname>testuser</d:displayname>
|
|
<d:getlastmodified>Mon, 01 Jan 2024 00:00:00 GMT</d:getlastmodified>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
<!-- Folder: Documents -->
|
|
<d:response>
|
|
<d:href>/remote.php/dav/files/testuser/Documents/</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype><d:collection/></d:resourcetype>
|
|
<d:displayname>Documents</d:displayname>
|
|
<d:getlastmodified>Mon, 10 Jun 2024 12:00:00 GMT</d:getlastmodified>
|
|
<oc:size>0</oc:size>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
<!-- Folder: Photos -->
|
|
<d:response>
|
|
<d:href>/remote.php/dav/files/testuser/Photos/</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype><d:collection/></d:resourcetype>
|
|
<d:displayname>Photos</d:displayname>
|
|
<d:getlastmodified>Tue, 11 Jun 2024 08:30:00 GMT</d:getlastmodified>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
<!-- Folder: My Work Files (contains spaces — encoded in href) -->
|
|
<d:response>
|
|
<d:href>/remote.php/dav/files/testuser/My%20Work%20Files/</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype><d:collection/></d:resourcetype>
|
|
<d:displayname>My Work Files</d:displayname>
|
|
<d:getlastmodified>Wed, 12 Jun 2024 09:00:00 GMT</d:getlastmodified>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
<!-- Folder: Unicode name: Café Designs -->
|
|
<d:response>
|
|
<d:href>/remote.php/dav/files/testuser/Caf%C3%A9%20Designs/</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype><d:collection/></d:resourcetype>
|
|
<d:displayname>Café Designs</d:displayname>
|
|
<d:getlastmodified>Thu, 13 Jun 2024 10:15:00 GMT</d:getlastmodified>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
<!-- File: report.pdf — all optional props present -->
|
|
<d:response>
|
|
<d:href>/remote.php/dav/files/testuser/report.pdf</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype/>
|
|
<d:displayname>report.pdf</d:displayname>
|
|
<d:getcontentlength>204800</d:getcontentlength>
|
|
<d:getcontenttype>application/pdf</d:getcontenttype>
|
|
<d:getlastmodified>Fri, 14 Jun 2024 14:00:00 GMT</d:getlastmodified>
|
|
<d:getetag>"abc123etag"</d:getetag>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
<!-- File: notes.txt — missing content-type and etag -->
|
|
<d:response>
|
|
<d:href>/remote.php/dav/files/testuser/notes.txt</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype/>
|
|
<d:displayname>notes.txt</d:displayname>
|
|
<d:getcontentlength>1024</d:getcontentlength>
|
|
<d:getlastmodified>Sat, 15 Jun 2024 10:00:00 GMT</d:getlastmodified>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
<!-- File: My Report Draft.docx — spaces in name -->
|
|
<d:response>
|
|
<d:href>/remote.php/dav/files/testuser/My%20Report%20Draft.docx</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype/>
|
|
<d:displayname>My Report Draft.docx</d:displayname>
|
|
<d:getcontentlength>51200</d:getcontentlength>
|
|
<d:getcontenttype>application/vnd.openxmlformats-officedocument.wordprocessingml.document</d:getcontenttype>
|
|
<d:getlastmodified>Sun, 16 Jun 2024 11:00:00 GMT</d:getlastmodified>
|
|
<d:getetag>"docx456etag"</d:getetag>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
<!-- File: image.png — size absent (should be None) -->
|
|
<d:response>
|
|
<d:href>/remote.php/dav/files/testuser/image.png</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype/>
|
|
<d:displayname>image.png</d:displayname>
|
|
<d:getcontenttype>image/png</d:getcontenttype>
|
|
<d:getlastmodified>Mon, 17 Jun 2024 12:30:00 GMT</d:getlastmodified>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
<!-- File: data.csv — all optional props absent (missing getcontenttype, getetag, size) -->
|
|
<d:response>
|
|
<d:href>/remote.php/dav/files/testuser/data.csv</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype/>
|
|
<d:displayname>data.csv</d:displayname>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
<!-- File: archive.zip — relative href (no leading slash) -->
|
|
<d:response>
|
|
<d:href>remote.php/dav/files/testuser/archive.zip</d:href>
|
|
<d:propstat>
|
|
<d:prop>
|
|
<d:resourcetype/>
|
|
<d:displayname>archive.zip</d:displayname>
|
|
<d:getcontentlength>102400</d:getcontentlength>
|
|
<d:getcontenttype>application/zip</d:getcontenttype>
|
|
<d:getlastmodified>Tue, 18 Jun 2024 09:00:00 GMT</d:getlastmodified>
|
|
<d:getetag>"zip789etag"</d:getetag>
|
|
</d:prop>
|
|
<d:status>HTTP/1.1 200 OK</d:status>
|
|
</d:propstat>
|
|
</d:response>
|
|
|
|
</d:multistatus>
|