test(12.1-01): add failing four-provider contract suite and fixtures
- 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
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"_comment": "Synthetic OneDrive fixture — no real credentials, tokens, drive IDs, or user data.",
|
||||
|
||||
"root_page1": {
|
||||
"value": [
|
||||
{
|
||||
"id": "synth_od_folder_a1b2",
|
||||
"name": "Projects",
|
||||
"folder": {"childCount": 3},
|
||||
"parentReference": {"driveId": "synth-drive-id", "id": "root"},
|
||||
"lastModifiedDateTime": "2024-06-10T12:00:00Z",
|
||||
"eTag": "etag_synth_folder_a1b2"
|
||||
},
|
||||
{
|
||||
"id": "synth_od_folder_c3d4",
|
||||
"name": "My Archive",
|
||||
"folder": {"childCount": 5},
|
||||
"parentReference": {"driveId": "synth-drive-id", "id": "root"},
|
||||
"lastModifiedDateTime": "2024-06-11T08:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": "synth_od_file_e5f6",
|
||||
"name": "report.pdf",
|
||||
"file": {"mimeType": "application/pdf"},
|
||||
"size": 204800,
|
||||
"parentReference": {"driveId": "synth-drive-id", "id": "root"},
|
||||
"lastModifiedDateTime": "2024-06-12T14:00:00Z",
|
||||
"eTag": "etag_synth_file_e5f6"
|
||||
}
|
||||
],
|
||||
"@odata.nextLink": "https://graph.microsoft.com/v1.0/me/drive/root/children?$skip=3&$top=3"
|
||||
},
|
||||
|
||||
"root_page2": {
|
||||
"value": [
|
||||
{
|
||||
"id": "synth_od_file_g7h8",
|
||||
"name": "My Report Draft.docx",
|
||||
"file": {"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
|
||||
"size": 51200,
|
||||
"parentReference": {"driveId": "synth-drive-id", "id": "root"},
|
||||
"lastModifiedDateTime": "2024-06-13T10:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": "synth_od_file_i9j0",
|
||||
"name": "notes.txt",
|
||||
"file": {"mimeType": "text/plain"},
|
||||
"size": 1024,
|
||||
"parentReference": {"driveId": "synth-drive-id", "id": "root"},
|
||||
"lastModifiedDateTime": "2024-06-14T09:00:00Z",
|
||||
"eTag": "etag_synth_file_i9j0"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"nested_children": {
|
||||
"value": [
|
||||
{
|
||||
"id": "synth_od_file_k1l2",
|
||||
"name": "sub-document.docx",
|
||||
"file": {"mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
|
||||
"size": 25600,
|
||||
"parentReference": {"driveId": "synth-drive-id", "id": "synth_od_folder_a1b2"},
|
||||
"lastModifiedDateTime": "2024-06-15T11:00:00Z"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"nullable_metadata": {
|
||||
"value": [
|
||||
{
|
||||
"id": "synth_od_file_m3n4",
|
||||
"name": "unknown-file.bin",
|
||||
"file": {},
|
||||
"parentReference": {"driveId": "synth-drive-id", "id": "root"},
|
||||
"lastModifiedDateTime": "2024-06-16T10:00:00Z"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"encoded_names": {
|
||||
"value": [
|
||||
{
|
||||
"id": "synth_od_file_o5p6",
|
||||
"name": "Annual Report & Summary.pdf",
|
||||
"file": {"mimeType": "application/pdf"},
|
||||
"size": 102400,
|
||||
"parentReference": {"driveId": "synth-drive-id", "id": "root"},
|
||||
"lastModifiedDateTime": "2024-06-17T13:00:00Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user