From f2f236bc1a1e7c7304ea117955733126db81539e Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 15 Dec 2023 09:37:12 +0100 Subject: [PATCH] refactor(nextcloud): Reuse containers in tests Signed-off-by: jld3103 --- packages/nextcloud/test/core_test.dart | 7 +- packages/nextcloud/test/dashboard_test.dart | 4 +- .../notes/create_note_favorite.regexp | 12 ++ .../notes/create_note_not_favorite.regexp | 12 ++ .../test/fixtures/notes/delete_note.regexp | 12 ++ ....regexp => get_and_update_settings.regexp} | 6 + .../test/fixtures/notes/get_note.regexp | 12 ++ .../test/fixtures/notes/get_notes.regexp | 12 ++ .../test/fixtures/notes/get_settings.regexp | 6 - .../test/fixtures/notes/update_note.regexp | 12 ++ .../update_note_fail_changed_on_server.regexp | 12 ++ .../endpoint/delete_all_notifications.regexp | 7 + .../endpoint/delete_notification.regexp | 16 +- .../endpoint/get_notification.regexp | 16 +- .../endpoint/list_notifications.regexp | 7 + .../spreed/chat/get_messages/directly.regexp | 4 +- .../spreed/chat/get_messages/polling.regexp | 2 +- .../fixtures/spreed/chat/send_message.regexp | 2 +- .../send_and_receive_messages.regexp | 2 +- .../user_status/heartbeat/heartbeat.regexp | 14 ++ .../user_status/statuses/find_all.regexp | 6 +- .../user_status/clear_message.regexp | 14 ++ .../user_status/user_status/find.regexp | 7 + .../user_status/user_status/get.regexp | 7 + .../user_status/user_status/set.regexp | 14 ++ .../user_status/set_custom_message.regexp | 14 ++ .../user_status/set_predefined_message.regexp | 14 ++ .../test/fixtures/webdav/filter_files.regexp | 4 +- .../webdav/get_directory_props.regexp | 6 +- .../webdav/litmus/basic/delete.regexp | 4 +- .../webdav/litmus/basic/delete_coll.regexp | 4 +- .../webdav/litmus/basic/delete_null.regexp | 2 +- .../fixtures/webdav/litmus/basic/mkcol.regexp | 2 +- .../webdav/litmus/basic/mkcol_again.regexp | 4 +- .../webdav/litmus/copymove/copy_coll.regexp | 64 ++++---- .../litmus/copymove/copy_nodestcoll.regexp | 4 +- .../litmus/copymove/copy_overwrite.regexp | 12 +- .../webdav/litmus/copymove/copy_simple.regexp | 6 +- .../webdav/litmus/copymove/move.regexp | 18 +-- .../webdav/litmus/copymove/move_coll.regexp | 72 ++++----- .../webdav/litmus/largefile/large_get.regexp | 4 +- .../fixtures/webdav/remove_properties.regexp | 10 +- .../fixtures/webdav/set_properties.regexp | 6 +- .../webdav/upload_and_download_file.regexp | 4 +- packages/nextcloud/test/notes_test.dart | 26 +++- .../nextcloud/test/notifications_test.dart | 78 +++++----- .../nextcloud/test/provisioning_api_test.dart | 4 +- packages/nextcloud/test/settings_test.dart | 4 +- packages/nextcloud/test/spreed_test.dart | 65 +++------ packages/nextcloud/test/uppush_test.dart | 4 +- packages/nextcloud/test/user_status_test.dart | 49 ++++--- packages/nextcloud/test/webdav_test.dart | 138 +++++++++--------- 52 files changed, 530 insertions(+), 317 deletions(-) rename packages/nextcloud/test/fixtures/notes/{update_settings.regexp => get_and_update_settings.regexp} (72%) delete mode 100644 packages/nextcloud/test/fixtures/notes/get_settings.regexp diff --git a/packages/nextcloud/test/core_test.dart b/packages/nextcloud/test/core_test.dart index 700e7419726..7070f498174 100644 --- a/packages/nextcloud/test/core_test.dart +++ b/packages/nextcloud/test/core_test.dart @@ -12,11 +12,11 @@ void main() { (final preset) { late DockerContainer container; late NextcloudClient client; - setUp(() async { + setUpAll(() async { container = await DockerContainer.create(preset); client = await TestNextcloudClient.create(container); }); - tearDown(() async { + tearDownAll(() async { if (Invoker.current!.liveTest.errors.isNotEmpty) { print(await container.allLogs()); } @@ -145,6 +145,9 @@ void main() { group('App password', () { test('Delete', () async { + // Separate client to not break other tests + final client = await TestNextcloudClient.create(container); + await client.core.appPassword.deleteAppPassword(); await expectLater( () => client.core.appPassword.deleteAppPassword(), diff --git a/packages/nextcloud/test/dashboard_test.dart b/packages/nextcloud/test/dashboard_test.dart index 22e0188d864..669dc25aa7a 100644 --- a/packages/nextcloud/test/dashboard_test.dart +++ b/packages/nextcloud/test/dashboard_test.dart @@ -12,11 +12,11 @@ void main() { (final preset) { late DockerContainer container; late NextcloudClient client; - setUp(() async { + setUpAll(() async { container = await DockerContainer.create(preset); client = await TestNextcloudClient.create(container); }); - tearDown(() async { + tearDownAll(() async { if (Invoker.current!.liveTest.errors.isNotEmpty) { print(await container.allLogs()); } diff --git a/packages/nextcloud/test/fixtures/notes/create_note_favorite.regexp b/packages/nextcloud/test/fixtures/notes/create_note_favorite.regexp index d92e4c8b09d..4d419439dbd 100644 --- a/packages/nextcloud/test/fixtures/notes/create_note_favorite.regexp +++ b/packages/nextcloud/test/fixtures/notes/create_note_favorite.regexp @@ -1,3 +1,15 @@ +GET http://localhost/index\.php/apps/notes/api/v1/notes\?exclude=&pruneBefore=0&chunkSize=0 +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +accept-encoding: gzip +content-length: 0 +authorization: Basic mock( +DELETE http://localhost/index\.php/apps/notes/api/v1/notes/[0-9]+ +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Basic mock)* POST http://localhost/index\.php/apps/notes/api/v1/notes\?category=c&title=a&content=b&modified=0&favorite=1 user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/notes/create_note_not_favorite.regexp b/packages/nextcloud/test/fixtures/notes/create_note_not_favorite.regexp index 1b109904688..6c6f9d4e132 100644 --- a/packages/nextcloud/test/fixtures/notes/create_note_not_favorite.regexp +++ b/packages/nextcloud/test/fixtures/notes/create_note_not_favorite.regexp @@ -1,3 +1,15 @@ +GET http://localhost/index\.php/apps/notes/api/v1/notes\?exclude=&pruneBefore=0&chunkSize=0 +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +accept-encoding: gzip +content-length: 0 +authorization: Basic mock( +DELETE http://localhost/index\.php/apps/notes/api/v1/notes/[0-9]+ +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Basic mock)* POST http://localhost/index\.php/apps/notes/api/v1/notes\?category=c&title=a&content=b&modified=0&favorite=0 user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/notes/delete_note.regexp b/packages/nextcloud/test/fixtures/notes/delete_note.regexp index 5ca8ae0032b..0318945d6b1 100644 --- a/packages/nextcloud/test/fixtures/notes/delete_note.regexp +++ b/packages/nextcloud/test/fixtures/notes/delete_note.regexp @@ -1,3 +1,15 @@ +GET http://localhost/index\.php/apps/notes/api/v1/notes\?exclude=&pruneBefore=0&chunkSize=0 +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +accept-encoding: gzip +content-length: 0 +authorization: Basic mock( +DELETE http://localhost/index\.php/apps/notes/api/v1/notes/[0-9]+ +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Basic mock)* POST http://localhost/index\.php/apps/notes/api/v1/notes\?category=&title=a&content=&modified=0&favorite=0 user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/notes/update_settings.regexp b/packages/nextcloud/test/fixtures/notes/get_and_update_settings.regexp similarity index 72% rename from packages/nextcloud/test/fixtures/notes/update_settings.regexp rename to packages/nextcloud/test/fixtures/notes/get_and_update_settings.regexp index 1d2cd1ea1c6..9ef366b0083 100644 --- a/packages/nextcloud/test/fixtures/notes/update_settings.regexp +++ b/packages/nextcloud/test/fixtures/notes/get_and_update_settings.regexp @@ -1,3 +1,9 @@ +GET http://localhost/index\.php/apps/notes/api/v1/settings +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +accept-encoding: gzip +content-length: 0 +authorization: Basic mock PUT http://localhost/index\.php/apps/notes/api/v1/settings user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/notes/get_note.regexp b/packages/nextcloud/test/fixtures/notes/get_note.regexp index 6b244a21902..031f6075d42 100644 --- a/packages/nextcloud/test/fixtures/notes/get_note.regexp +++ b/packages/nextcloud/test/fixtures/notes/get_note.regexp @@ -1,3 +1,15 @@ +GET http://localhost/index\.php/apps/notes/api/v1/notes\?exclude=&pruneBefore=0&chunkSize=0 +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +accept-encoding: gzip +content-length: 0 +authorization: Basic mock( +DELETE http://localhost/index\.php/apps/notes/api/v1/notes/[0-9]+ +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Basic mock)* POST http://localhost/index\.php/apps/notes/api/v1/notes\?category=&title=a&content=&modified=0&favorite=0 user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/notes/get_notes.regexp b/packages/nextcloud/test/fixtures/notes/get_notes.regexp index 00dba05782b..48d8fe157b8 100644 --- a/packages/nextcloud/test/fixtures/notes/get_notes.regexp +++ b/packages/nextcloud/test/fixtures/notes/get_notes.regexp @@ -1,3 +1,15 @@ +GET http://localhost/index\.php/apps/notes/api/v1/notes\?exclude=&pruneBefore=0&chunkSize=0 +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +accept-encoding: gzip +content-length: 0 +authorization: Basic mock( +DELETE http://localhost/index\.php/apps/notes/api/v1/notes/[0-9]+ +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Basic mock)* POST http://localhost/index\.php/apps/notes/api/v1/notes\?category=&title=a&content=&modified=0&favorite=0 user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/notes/get_settings.regexp b/packages/nextcloud/test/fixtures/notes/get_settings.regexp deleted file mode 100644 index 3ae06776b6b..00000000000 --- a/packages/nextcloud/test/fixtures/notes/get_settings.regexp +++ /dev/null @@ -1,6 +0,0 @@ -GET http://localhost/index\.php/apps/notes/api/v1/settings -user-agent: Dart/3\.2 \(dart:io\) -accept: application/json -accept-encoding: gzip -content-length: 0 -authorization: Basic mock \ No newline at end of file diff --git a/packages/nextcloud/test/fixtures/notes/update_note.regexp b/packages/nextcloud/test/fixtures/notes/update_note.regexp index dde09e34502..f81c9be9945 100644 --- a/packages/nextcloud/test/fixtures/notes/update_note.regexp +++ b/packages/nextcloud/test/fixtures/notes/update_note.regexp @@ -1,3 +1,15 @@ +GET http://localhost/index\.php/apps/notes/api/v1/notes\?exclude=&pruneBefore=0&chunkSize=0 +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +accept-encoding: gzip +content-length: 0 +authorization: Basic mock( +DELETE http://localhost/index\.php/apps/notes/api/v1/notes/[0-9]+ +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Basic mock)* POST http://localhost/index\.php/apps/notes/api/v1/notes\?category=&title=a&content=&modified=0&favorite=0 user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/notes/update_note_fail_changed_on_server.regexp b/packages/nextcloud/test/fixtures/notes/update_note_fail_changed_on_server.regexp index 661facc9dd6..5e8048ff435 100644 --- a/packages/nextcloud/test/fixtures/notes/update_note_fail_changed_on_server.regexp +++ b/packages/nextcloud/test/fixtures/notes/update_note_fail_changed_on_server.regexp @@ -1,3 +1,15 @@ +GET http://localhost/index\.php/apps/notes/api/v1/notes\?exclude=&pruneBefore=0&chunkSize=0 +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +accept-encoding: gzip +content-length: 0 +authorization: Basic mock( +DELETE http://localhost/index\.php/apps/notes/api/v1/notes/[0-9]+ +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Basic mock)* POST http://localhost/index\.php/apps/notes/api/v1/notes\?category=&title=a&content=&modified=0&favorite=0 user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/notifications/endpoint/delete_all_notifications.regexp b/packages/nextcloud/test/fixtures/notifications/endpoint/delete_all_notifications.regexp index e10bc9d0bf3..2041a97543d 100644 --- a/packages/nextcloud/test/fixtures/notifications/endpoint/delete_all_notifications.regexp +++ b/packages/nextcloud/test/fixtures/notifications/endpoint/delete_all_notifications.regexp @@ -1,3 +1,10 @@ +DELETE http://localhost/ocs/v2\.php/apps/notifications/api/v2/notifications +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true POST http://localhost/ocs/v2\.php/apps/notifications/api/v2/admin_notifications/admin\?shortMessage=123&longMessage=456 user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/notifications/endpoint/delete_notification.regexp b/packages/nextcloud/test/fixtures/notifications/endpoint/delete_notification.regexp index 8784c5f1a8c..ccf8eeebfd6 100644 --- a/packages/nextcloud/test/fixtures/notifications/endpoint/delete_notification.regexp +++ b/packages/nextcloud/test/fixtures/notifications/endpoint/delete_notification.regexp @@ -1,3 +1,10 @@ +DELETE http://localhost/ocs/v2\.php/apps/notifications/api/v2/notifications +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true POST http://localhost/ocs/v2\.php/apps/notifications/api/v2/admin_notifications/admin\?shortMessage=123&longMessage=456 user-agent: Dart/3\.2 \(dart:io\) accept: application/json @@ -5,7 +12,14 @@ transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock ocs-apirequest: true -DELETE http://localhost/ocs/v2\.php/apps/notifications/api/v2/notifications/2 +GET http://localhost/ocs/v2\.php/apps/notifications/api/v2/notifications +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +accept-encoding: gzip +content-length: 0 +authorization: Bearer mock +ocs-apirequest: true +DELETE http://localhost/ocs/v2\.php/apps/notifications/api/v2/notifications/[0-9]+ user-agent: Dart/3\.2 \(dart:io\) accept: application/json transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/notifications/endpoint/get_notification.regexp b/packages/nextcloud/test/fixtures/notifications/endpoint/get_notification.regexp index 2be87a25df8..68118a977b1 100644 --- a/packages/nextcloud/test/fixtures/notifications/endpoint/get_notification.regexp +++ b/packages/nextcloud/test/fixtures/notifications/endpoint/get_notification.regexp @@ -1,3 +1,10 @@ +DELETE http://localhost/ocs/v2\.php/apps/notifications/api/v2/notifications +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true POST http://localhost/ocs/v2\.php/apps/notifications/api/v2/admin_notifications/admin\?shortMessage=123&longMessage=456 user-agent: Dart/3\.2 \(dart:io\) accept: application/json @@ -5,7 +12,14 @@ transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock ocs-apirequest: true -GET http://localhost/ocs/v2\.php/apps/notifications/api/v2/notifications/2 +GET http://localhost/ocs/v2\.php/apps/notifications/api/v2/notifications +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +accept-encoding: gzip +content-length: 0 +authorization: Bearer mock +ocs-apirequest: true +GET http://localhost/ocs/v2\.php/apps/notifications/api/v2/notifications/[0-9]+ user-agent: Dart/3\.2 \(dart:io\) accept: application/json accept-encoding: gzip diff --git a/packages/nextcloud/test/fixtures/notifications/endpoint/list_notifications.regexp b/packages/nextcloud/test/fixtures/notifications/endpoint/list_notifications.regexp index ba927d022de..151071668a8 100644 --- a/packages/nextcloud/test/fixtures/notifications/endpoint/list_notifications.regexp +++ b/packages/nextcloud/test/fixtures/notifications/endpoint/list_notifications.regexp @@ -1,3 +1,10 @@ +DELETE http://localhost/ocs/v2\.php/apps/notifications/api/v2/notifications +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true POST http://localhost/ocs/v2\.php/apps/notifications/api/v2/admin_notifications/admin\?shortMessage=123&longMessage=456 user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/spreed/chat/get_messages/directly.regexp b/packages/nextcloud/test/fixtures/spreed/chat/get_messages/directly.regexp index 3f4c4927380..181c009ad88 100644 --- a/packages/nextcloud/test/fixtures/spreed/chat/get_messages/directly.regexp +++ b/packages/nextcloud/test/fixtures/spreed/chat/get_messages/directly.regexp @@ -1,4 +1,4 @@ -POST http://localhost/ocs/v2\.php/apps/spreed/api/v4/room\?roomType=1&invite=user2&roomName=&source=&objectType=&objectId= +POST http://localhost/ocs/v2\.php/apps/spreed/api/v4/room\?roomType=3&invite=&roomName=Test&source=&objectType=&objectId= user-agent: Dart/3\.2 \(dart:io\) accept: application/json transfer-encoding: chunked @@ -12,7 +12,7 @@ transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock ocs-apirequest: true -POST http://localhost/ocs/v2\.php/apps/spreed/api/v1/chat/[a-z0-9]{8}\?message=123&actorDisplayName=&referenceId=&replyTo=2&silent=0 +POST http://localhost/ocs/v2\.php/apps/spreed/api/v1/chat/[a-z0-9]{8}\?message=123&actorDisplayName=&referenceId=&replyTo=[0-9]+&silent=0 user-agent: Dart/3\.2 \(dart:io\) accept: application/json transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/spreed/chat/get_messages/polling.regexp b/packages/nextcloud/test/fixtures/spreed/chat/get_messages/polling.regexp index 966004b0127..38bde1762b9 100644 --- a/packages/nextcloud/test/fixtures/spreed/chat/get_messages/polling.regexp +++ b/packages/nextcloud/test/fixtures/spreed/chat/get_messages/polling.regexp @@ -12,7 +12,7 @@ transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock ocs-apirequest: true -GET http://localhost/ocs/v2\.php/apps/spreed/api/v1/chat/[a-z0-9]{8}\?lookIntoFuture=1&limit=100&lastKnownMessageId=2&lastCommonReadId=0&timeout=3&setReadMarker=1&includeLastKnown=0&noStatusUpdate=0&markNotificationsAsRead=1 +GET http://localhost/ocs/v2\.php/apps/spreed/api/v1/chat/[a-z0-9]{8}\?lookIntoFuture=1&limit=100&lastKnownMessageId=[0-9]+&lastCommonReadId=0&timeout=3&setReadMarker=1&includeLastKnown=0&noStatusUpdate=0&markNotificationsAsRead=1 user-agent: Dart/3\.2 \(dart:io\) accept: application/json accept-encoding: gzip diff --git a/packages/nextcloud/test/fixtures/spreed/chat/send_message.regexp b/packages/nextcloud/test/fixtures/spreed/chat/send_message.regexp index a3295729def..5a044991512 100644 --- a/packages/nextcloud/test/fixtures/spreed/chat/send_message.regexp +++ b/packages/nextcloud/test/fixtures/spreed/chat/send_message.regexp @@ -1,4 +1,4 @@ -POST http://localhost/ocs/v2\.php/apps/spreed/api/v4/room\?roomType=1&invite=user2&roomName=&source=&objectType=&objectId= +POST http://localhost/ocs/v2\.php/apps/spreed/api/v4/room\?roomType=3&invite=&roomName=Test&source=&objectType=&objectId= user-agent: Dart/3\.2 \(dart:io\) accept: application/json transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/spreed/signaling/send_and_receive_messages.regexp b/packages/nextcloud/test/fixtures/spreed/signaling/send_and_receive_messages.regexp index 303e881003a..832219cc931 100644 --- a/packages/nextcloud/test/fixtures/spreed/signaling/send_and_receive_messages.regexp +++ b/packages/nextcloud/test/fixtures/spreed/signaling/send_and_receive_messages.regexp @@ -1,4 +1,4 @@ -POST http://localhost/ocs/v2\.php/apps/spreed/api/v4/room\?roomType=1&invite=user2&roomName=&source=&objectType=&objectId= +POST http://localhost/ocs/v2\.php/apps/spreed/api/v4/room\?roomType=3&invite=&roomName=Test&source=&objectType=&objectId= user-agent: Dart/3\.2 \(dart:io\) accept: application/json transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/user_status/heartbeat/heartbeat.regexp b/packages/nextcloud/test/fixtures/user_status/heartbeat/heartbeat.regexp index 81930d9c463..26782bad896 100644 --- a/packages/nextcloud/test/fixtures/user_status/heartbeat/heartbeat.regexp +++ b/packages/nextcloud/test/fixtures/user_status/heartbeat/heartbeat.regexp @@ -1,3 +1,17 @@ +PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/status\?statusType=online +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true +DELETE http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/heartbeat\?status=online user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/user_status/statuses/find_all.regexp b/packages/nextcloud/test/fixtures/user_status/statuses/find_all.regexp index 068df473935..3e63d8323ac 100644 --- a/packages/nextcloud/test/fixtures/user_status/statuses/find_all.regexp +++ b/packages/nextcloud/test/fixtures/user_status/statuses/find_all.regexp @@ -1,11 +1,11 @@ -GET http://localhost/ocs/v2\.php/apps/user_status/api/v1/statuses +PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/status\?statusType=online user-agent: Dart/3\.2 \(dart:io\) accept: application/json +transfer-encoding: chunked accept-encoding: gzip -content-length: 0 authorization: Bearer mock ocs-apirequest: true -PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/status\?statusType=online +DELETE http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message user-agent: Dart/3\.2 \(dart:io\) accept: application/json transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/user_status/user_status/clear_message.regexp b/packages/nextcloud/test/fixtures/user_status/user_status/clear_message.regexp index d89fefc0d8f..713d71da4c7 100644 --- a/packages/nextcloud/test/fixtures/user_status/user_status/clear_message.regexp +++ b/packages/nextcloud/test/fixtures/user_status/user_status/clear_message.regexp @@ -1,3 +1,17 @@ +PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/status\?statusType=online +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true +DELETE http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message/custom\?statusIcon=%F0%9F%98%80&message=bla&clearAt=[0-9]+ user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/user_status/user_status/find.regexp b/packages/nextcloud/test/fixtures/user_status/user_status/find.regexp index 213d37bfbf5..0aa3bdc5f17 100644 --- a/packages/nextcloud/test/fixtures/user_status/user_status/find.regexp +++ b/packages/nextcloud/test/fixtures/user_status/user_status/find.regexp @@ -5,6 +5,13 @@ transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock ocs-apirequest: true +DELETE http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true GET http://localhost/ocs/v2\.php/apps/user_status/api/v1/statuses/user1 user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/user_status/user_status/get.regexp b/packages/nextcloud/test/fixtures/user_status/user_status/get.regexp index de09c138884..c2d2c708296 100644 --- a/packages/nextcloud/test/fixtures/user_status/user_status/get.regexp +++ b/packages/nextcloud/test/fixtures/user_status/user_status/get.regexp @@ -5,6 +5,13 @@ transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock ocs-apirequest: true +DELETE http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true GET http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/user_status/user_status/set.regexp b/packages/nextcloud/test/fixtures/user_status/user_status/set.regexp index b181cd54f30..6226c9663a7 100644 --- a/packages/nextcloud/test/fixtures/user_status/user_status/set.regexp +++ b/packages/nextcloud/test/fixtures/user_status/user_status/set.regexp @@ -4,4 +4,18 @@ accept: application/json transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock +ocs-apirequest: true +DELETE http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true +PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/status\?statusType=online +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock ocs-apirequest: true \ No newline at end of file diff --git a/packages/nextcloud/test/fixtures/user_status/user_status/set_custom_message.regexp b/packages/nextcloud/test/fixtures/user_status/user_status/set_custom_message.regexp index 6edd359d941..5a20684c759 100644 --- a/packages/nextcloud/test/fixtures/user_status/user_status/set_custom_message.regexp +++ b/packages/nextcloud/test/fixtures/user_status/user_status/set_custom_message.regexp @@ -1,3 +1,17 @@ +PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/status\?statusType=online +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true +DELETE http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message/custom\?statusIcon=%F0%9F%98%80&message=bla&clearAt=[0-9]+ user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/user_status/user_status/set_predefined_message.regexp b/packages/nextcloud/test/fixtures/user_status/user_status/set_predefined_message.regexp index a7fa1ca6ecd..a639bc49d00 100644 --- a/packages/nextcloud/test/fixtures/user_status/user_status/set_predefined_message.regexp +++ b/packages/nextcloud/test/fixtures/user_status/user_status/set_predefined_message.regexp @@ -1,3 +1,17 @@ +PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/status\?statusType=online +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true +DELETE http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message +user-agent: Dart/3\.2 \(dart:io\) +accept: application/json +transfer-encoding: chunked +accept-encoding: gzip +authorization: Bearer mock +ocs-apirequest: true PUT http://localhost/ocs/v2\.php/apps/user_status/api/v1/user_status/message/predefined\?messageId=meeting&clearAt=[0-9]+ user-agent: Dart/3\.2 \(dart:io\) accept: application/json diff --git a/packages/nextcloud/test/fixtures/webdav/filter_files.regexp b/packages/nextcloud/test/fixtures/webdav/filter_files.regexp index 60155d62db7..4812b6d9548 100644 --- a/packages/nextcloud/test/fixtures/webdav/filter_files.regexp +++ b/packages/nextcloud/test/fixtures/webdav/filter_files.regexp @@ -1,11 +1,11 @@ -PUT http://localhost/remote\.php/webdav/test\.txt +PUT http://localhost/remote\.php/webdav/filter\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 4 authorization: Bearer mock test -PROPPATCH http://localhost/remote\.php/webdav/test\.txt +PROPPATCH http://localhost/remote\.php/webdav/filter\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/webdav/get_directory_props.regexp b/packages/nextcloud/test/fixtures/webdav/get_directory_props.regexp index 20163dea0ac..449daf9a671 100644 --- a/packages/nextcloud/test/fixtures/webdav/get_directory_props.regexp +++ b/packages/nextcloud/test/fixtures/webdav/get_directory_props.regexp @@ -1,17 +1,17 @@ -MKCOL http://localhost/remote\.php/webdav/test +MKCOL http://localhost/remote\.php/webdav/dir-props user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/test/test\.txt +PUT http://localhost/remote\.php/webdav/dir-props/test\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 4 authorization: Bearer mock test -PROPFIND http://localhost/remote\.php/webdav/test +PROPFIND http://localhost/remote\.php/webdav/dir-props user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked accept-encoding: gzip diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete.regexp index ea10caf9f47..8656e05a71c 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete.regexp @@ -1,10 +1,10 @@ -PUT http://localhost/remote\.php/webdav/test\.txt +PUT http://localhost/remote\.php/webdav/delete\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/test\.txt +DELETE http://localhost/remote\.php/webdav/delete\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete_coll.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete_coll.regexp index d9bdf5c2d3b..a20e066fecb 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete_coll.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete_coll.regexp @@ -1,10 +1,10 @@ -MKCOL http://localhost/remote\.php/webdav/test +MKCOL http://localhost/remote\.php/webdav/delete-coll user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/test +DELETE http://localhost/remote\.php/webdav/delete-coll user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete_null.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete_null.regexp index e3219406a5c..c6c5803f1ac 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete_null.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/basic/delete_null.regexp @@ -1,4 +1,4 @@ -DELETE http://localhost/remote\.php/webdav/test\.txt +DELETE http://localhost/remote\.php/webdav/delete-null\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/basic/mkcol.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/basic/mkcol.regexp index a8c9fbcbad8..44aee1af954 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/basic/mkcol.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/basic/mkcol.regexp @@ -1,4 +1,4 @@ -MKCOL http://localhost/remote\.php/webdav/test +MKCOL http://localhost/remote\.php/webdav/mkcol user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/basic/mkcol_again.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/basic/mkcol_again.regexp index b4475ad029a..03d808c43fa 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/basic/mkcol_again.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/basic/mkcol_again.regexp @@ -1,10 +1,10 @@ -MKCOL http://localhost/remote\.php/webdav/test +MKCOL http://localhost/remote\.php/webdav/mkcol-again user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -MKCOL http://localhost/remote\.php/webdav/test +MKCOL http://localhost/remote\.php/webdav/mkcol-again user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_coll.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_coll.regexp index 50bc8bcc5cf..43bf65b67ba 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_coll.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_coll.regexp @@ -1,174 +1,174 @@ -MKCOL http://localhost/remote\.php/webdav/src +MKCOL http://localhost/remote\.php/webdav/copy-coll-src user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -MKCOL http://localhost/remote\.php/webdav/src/sub +MKCOL http://localhost/remote\.php/webdav/copy-coll-src/sub user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/0\.txt +PUT http://localhost/remote\.php/webdav/copy-coll-src/0\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/1\.txt +PUT http://localhost/remote\.php/webdav/copy-coll-src/1\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/2\.txt +PUT http://localhost/remote\.php/webdav/copy-coll-src/2\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/3\.txt +PUT http://localhost/remote\.php/webdav/copy-coll-src/3\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/4\.txt +PUT http://localhost/remote\.php/webdav/copy-coll-src/4\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/5\.txt +PUT http://localhost/remote\.php/webdav/copy-coll-src/5\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/6\.txt +PUT http://localhost/remote\.php/webdav/copy-coll-src/6\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/7\.txt +PUT http://localhost/remote\.php/webdav/copy-coll-src/7\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/8\.txt +PUT http://localhost/remote\.php/webdav/copy-coll-src/8\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/9\.txt +PUT http://localhost/remote\.php/webdav/copy-coll-src/9\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -COPY http://localhost/remote\.php/webdav/src +COPY http://localhost/remote\.php/webdav/copy-coll-src user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst1 +destination: http://localhost/remote\.php/webdav/copy-coll-dst1 accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: F -COPY http://localhost/remote\.php/webdav/src +COPY http://localhost/remote\.php/webdav/copy-coll-src user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst2 +destination: http://localhost/remote\.php/webdav/copy-coll-dst2 accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: F -COPY http://localhost/remote\.php/webdav/src +COPY http://localhost/remote\.php/webdav/copy-coll-src user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst1 +destination: http://localhost/remote\.php/webdav/copy-coll-dst1 accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: F -COPY http://localhost/remote\.php/webdav/src +COPY http://localhost/remote\.php/webdav/copy-coll-src user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst2 +destination: http://localhost/remote\.php/webdav/copy-coll-dst2 accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: T -DELETE http://localhost/remote\.php/webdav/dst1/0\.txt +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/0\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/1\.txt +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/1\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/2\.txt +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/2\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/3\.txt +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/3\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/4\.txt +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/4\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/5\.txt +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/5\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/6\.txt +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/6\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/7\.txt +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/7\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/8\.txt +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/8\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/9\.txt +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/9\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/sub +DELETE http://localhost/remote\.php/webdav/copy-coll-dst1/sub user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst2 +DELETE http://localhost/remote\.php/webdav/copy-coll-dst2 user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_nodestcoll.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_nodestcoll.regexp index 0738210dcec..6d7af2bc758 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_nodestcoll.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_nodestcoll.regexp @@ -1,10 +1,10 @@ -MKCOL http://localhost/remote\.php/webdav/src +MKCOL http://localhost/remote\.php/webdav/copy-nodestcoll-src user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -COPY http://localhost/remote\.php/webdav/src +COPY http://localhost/remote\.php/webdav/copy-nodestcoll-src user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked destination: http://localhost/remote\.php/webdav/nonesuch/dst diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_overwrite.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_overwrite.regexp index 792f31d23f2..22428afd134 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_overwrite.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_overwrite.regexp @@ -1,27 +1,27 @@ -MKCOL http://localhost/remote\.php/webdav/src +MKCOL http://localhost/remote\.php/webdav/copy-overwrite-src user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -MKCOL http://localhost/remote\.php/webdav/dst +MKCOL http://localhost/remote\.php/webdav/copy-overwrite-dst user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -COPY http://localhost/remote\.php/webdav/src +COPY http://localhost/remote\.php/webdav/copy-overwrite-src user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst +destination: http://localhost/remote\.php/webdav/copy-overwrite-dst accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: F -COPY http://localhost/remote\.php/webdav/src +COPY http://localhost/remote\.php/webdav/copy-overwrite-src user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst +destination: http://localhost/remote\.php/webdav/copy-overwrite-dst accept-encoding: gzip authorization: Bearer mock content-type: application/xml diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_simple.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_simple.regexp index d0058c43f09..da21df3f054 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_simple.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/copy_simple.regexp @@ -1,13 +1,13 @@ -MKCOL http://localhost/remote\.php/webdav/src +MKCOL http://localhost/remote\.php/webdav/copy-simple-src user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -COPY http://localhost/remote\.php/webdav/src +COPY http://localhost/remote\.php/webdav/copy-simple-src user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst +destination: http://localhost/remote\.php/webdav/copy-simple-dst accept-encoding: gzip authorization: Bearer mock content-type: application/xml diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/move.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/move.regexp index 751bc23b34c..793363306ab 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/move.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/move.regexp @@ -1,41 +1,41 @@ -PUT http://localhost/remote\.php/webdav/src1\.txt +PUT http://localhost/remote\.php/webdav/move-src1\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src2\.txt +PUT http://localhost/remote\.php/webdav/move-src2\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -MKCOL http://localhost/remote\.php/webdav/coll +MKCOL http://localhost/remote\.php/webdav/move-coll user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -MOVE http://localhost/remote\.php/webdav/src1\.txt +MOVE http://localhost/remote\.php/webdav/move-src1\.txt user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst\.txt +destination: http://localhost/remote\.php/webdav/move-dst\.txt accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: F -MOVE http://localhost/remote\.php/webdav/src2\.txt +MOVE http://localhost/remote\.php/webdav/move-src2\.txt user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst\.txt +destination: http://localhost/remote\.php/webdav/move-dst\.txt accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: F -MOVE http://localhost/remote\.php/webdav/src2\.txt +MOVE http://localhost/remote\.php/webdav/move-src2\.txt user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst\.txt +destination: http://localhost/remote\.php/webdav/move-dst\.txt accept-encoding: gzip authorization: Bearer mock content-type: application/xml diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/move_coll.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/move_coll.regexp index c9165b6359a..585cc5eafd5 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/copymove/move_coll.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/copymove/move_coll.regexp @@ -1,191 +1,191 @@ -MKCOL http://localhost/remote\.php/webdav/src +MKCOL http://localhost/remote\.php/webdav/move-coll-src user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -MKCOL http://localhost/remote\.php/webdav/src/sub +MKCOL http://localhost/remote\.php/webdav/move-coll-src/sub user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/0\.txt +PUT http://localhost/remote\.php/webdav/move-coll-src/0\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/1\.txt +PUT http://localhost/remote\.php/webdav/move-coll-src/1\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/2\.txt +PUT http://localhost/remote\.php/webdav/move-coll-src/2\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/3\.txt +PUT http://localhost/remote\.php/webdav/move-coll-src/3\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/4\.txt +PUT http://localhost/remote\.php/webdav/move-coll-src/4\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/5\.txt +PUT http://localhost/remote\.php/webdav/move-coll-src/5\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/6\.txt +PUT http://localhost/remote\.php/webdav/move-coll-src/6\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/7\.txt +PUT http://localhost/remote\.php/webdav/move-coll-src/7\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/8\.txt +PUT http://localhost/remote\.php/webdav/move-coll-src/8\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/src/9\.txt +PUT http://localhost/remote\.php/webdav/move-coll-src/9\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -PUT http://localhost/remote\.php/webdav/noncoll +PUT http://localhost/remote\.php/webdav/move-coll-noncoll user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 0 authorization: Bearer mock -COPY http://localhost/remote\.php/webdav/src +COPY http://localhost/remote\.php/webdav/move-coll-src user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst2 +destination: http://localhost/remote\.php/webdav/move-coll-dst2 accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: F -MOVE http://localhost/remote\.php/webdav/src +MOVE http://localhost/remote\.php/webdav/move-coll-src user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst1 +destination: http://localhost/remote\.php/webdav/move-coll-dst1 accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: F -MOVE http://localhost/remote\.php/webdav/dst1 +MOVE http://localhost/remote\.php/webdav/move-coll-dst1 user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst2 +destination: http://localhost/remote\.php/webdav/move-coll-dst2 accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: F -MOVE http://localhost/remote\.php/webdav/dst2 +MOVE http://localhost/remote\.php/webdav/move-coll-dst2 user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst1 +destination: http://localhost/remote\.php/webdav/move-coll-dst1 accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: T -COPY http://localhost/remote\.php/webdav/dst1 +COPY http://localhost/remote\.php/webdav/move-coll-dst1 user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/dst2 +destination: http://localhost/remote\.php/webdav/move-coll-dst2 accept-encoding: gzip authorization: Bearer mock content-type: application/xml overwrite: F -DELETE http://localhost/remote\.php/webdav/dst1/0\.txt +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/0\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/1\.txt +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/1\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/2\.txt +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/2\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/3\.txt +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/3\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/4\.txt +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/4\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/5\.txt +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/5\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/6\.txt +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/6\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/7\.txt +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/7\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/8\.txt +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/8\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/9\.txt +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/9\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -DELETE http://localhost/remote\.php/webdav/dst1/sub +DELETE http://localhost/remote\.php/webdav/move-coll-dst1/sub user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -MOVE http://localhost/remote\.php/webdav/dst2 +MOVE http://localhost/remote\.php/webdav/move-coll-dst2 user-agent: Dart/3\.2 \(dart:io\) transfer-encoding: chunked -destination: http://localhost/remote\.php/webdav/noncoll +destination: http://localhost/remote\.php/webdav/move-coll-noncoll accept-encoding: gzip authorization: Bearer mock content-type: application/xml diff --git a/packages/nextcloud/test/fixtures/webdav/litmus/largefile/large_get.regexp b/packages/nextcloud/test/fixtures/webdav/litmus/largefile/large_get.regexp index 7c89a186461..dc31956ce65 100644 --- a/packages/nextcloud/test/fixtures/webdav/litmus/largefile/large_get.regexp +++ b/packages/nextcloud/test/fixtures/webdav/litmus/largefile/large_get.regexp @@ -1,11 +1,11 @@ -PUT http://localhost/remote\.php/webdav/test\.txt +PUT http://localhost/remote\.php/webdav/largefile\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 1000000000 authorization: Bearer mock .* -GET http://localhost/remote\.php/webdav/test\.txt +GET http://localhost/remote\.php/webdav/largefile\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip diff --git a/packages/nextcloud/test/fixtures/webdav/remove_properties.regexp b/packages/nextcloud/test/fixtures/webdav/remove_properties.regexp index cbc0171a8cc..3fe27f9b708 100644 --- a/packages/nextcloud/test/fixtures/webdav/remove_properties.regexp +++ b/packages/nextcloud/test/fixtures/webdav/remove_properties.regexp @@ -1,32 +1,32 @@ -PUT http://localhost/remote\.php/webdav/test\.txt +PUT http://localhost/remote\.php/webdav/remove-props\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 4 authorization: Bearer mock test -PROPPATCH http://localhost/remote\.php/webdav/test\.txt +PROPPATCH http://localhost/remote\.php/webdav/remove-props\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock 1 -PROPFIND http://localhost/remote\.php/webdav/test\.txt +PROPFIND http://localhost/remote\.php/webdav/remove-props\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -PROPPATCH http://localhost/remote\.php/webdav/test\.txt +PROPPATCH http://localhost/remote\.php/webdav/remove-props\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock -PROPFIND http://localhost/remote\.php/webdav/test\.txt +PROPFIND http://localhost/remote\.php/webdav/remove-props\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/webdav/set_properties.regexp b/packages/nextcloud/test/fixtures/webdav/set_properties.regexp index 8e61cd2e682..0f065da82a0 100644 --- a/packages/nextcloud/test/fixtures/webdav/set_properties.regexp +++ b/packages/nextcloud/test/fixtures/webdav/set_properties.regexp @@ -1,4 +1,4 @@ -PUT http://localhost/remote\.php/webdav/test\.txt +PUT http://localhost/remote\.php/webdav/set-props\.txt user-agent: Dart/3\.2 \(dart:io\) x-oc-ctime: 34214400 accept-encoding: gzip @@ -7,14 +7,14 @@ x-oc-mtime: 68256000 authorization: Bearer mock content-type: application/xml test -PROPPATCH http://localhost/remote\.php/webdav/test\.txt +PROPPATCH http://localhost/remote\.php/webdav/set-props\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked accept-encoding: gzip authorization: Bearer mock 1 -PROPFIND http://localhost/remote\.php/webdav/test\.txt +PROPFIND http://localhost/remote\.php/webdav/set-props\.txt user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml transfer-encoding: chunked diff --git a/packages/nextcloud/test/fixtures/webdav/upload_and_download_file.regexp b/packages/nextcloud/test/fixtures/webdav/upload_and_download_file.regexp index f70188e4fa1..28af9afa027 100644 --- a/packages/nextcloud/test/fixtures/webdav/upload_and_download_file.regexp +++ b/packages/nextcloud/test/fixtures/webdav/upload_and_download_file.regexp @@ -1,11 +1,11 @@ -PUT http://localhost/remote\.php/webdav/test\.png +PUT http://localhost/remote\.php/webdav/upload\.png user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip content-length: 8650 authorization: Bearer mock iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAIAAABnsVYUAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH5AMPEAwo2\+TdNAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAACAASURBVHja7NgxAQAgDMAwQMH8O8IVJuiXSOjZfWcWAAAAAAD8diQAAAAAAKBgQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AAAAAAAJAxoAAAAAgIQBDQAAAABAwoAGAAAAACBhQAMAAAAAkDCgAQAAAABIGNAAAAAAACQMaAAAAAAAEgY0AA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AAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADZL2FUgAAAThJREFUAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwEJAAwAAAACwENAAAAAAACwENAAAAAAACwENAAAAAMBCQAMAAAAAsBDQAAAAAAAsBDQAAAAAAAsBDQAAAADAQkADAAAAALAQ0AAAAAAALAQ0AAAAAAALAQ0AAAAAwCKNfglZ0nZIRwAAAABJRU5ErkJggg== -GET http://localhost/remote\.php/webdav/test\.png +GET http://localhost/remote\.php/webdav/upload\.png user-agent: Dart/3\.2 \(dart:io\) content-type: application/xml accept-encoding: gzip diff --git a/packages/nextcloud/test/notes_test.dart b/packages/nextcloud/test/notes_test.dart index 2b788363b35..62d3e4a1af0 100644 --- a/packages/nextcloud/test/notes_test.dart +++ b/packages/nextcloud/test/notes_test.dart @@ -12,17 +12,24 @@ void main() { (final preset) { late DockerContainer container; late NextcloudClient client; - setUp(() async { + setUpAll(() async { container = await DockerContainer.create(preset); client = await TestNextcloudClient.create(container); }); - tearDown(() async { + tearDownAll(() async { if (Invoker.current!.liveTest.errors.isNotEmpty) { print(await container.allLogs()); } container.destroy(); }); + Future deleteAllNotes() async { + final response = await client.notes.getNotes(); + for (final note in response.body) { + await client.notes.deleteNote(id: note.id); + } + } + test('Is supported', () async { final response = await client.core.ocs.getCapabilities(); expect(response.statusCode, 200); @@ -35,6 +42,7 @@ void main() { }); test('Create note favorite', () async { + await deleteAllNotes(); final response = await client.notes.createNote( title: 'a', content: 'b', @@ -55,6 +63,7 @@ void main() { }); test('Create note not favorite', () async { + await deleteAllNotes(); final response = await client.notes.createNote( title: 'a', content: 'b', @@ -74,6 +83,7 @@ void main() { }); test('Get notes', () async { + await deleteAllNotes(); await client.notes.createNote(title: 'a'); await client.notes.createNote(title: 'b'); @@ -87,6 +97,7 @@ void main() { }); test('Get note', () async { + await deleteAllNotes(); final response = await client.notes.getNote( id: (await client.notes.createNote(title: 'a')).body.id, ); @@ -97,6 +108,7 @@ void main() { }); test('Update note', () async { + await deleteAllNotes(); final id = (await client.notes.createNote(title: 'a')).body.id; await client.notes.updateNote( id: id, @@ -111,6 +123,7 @@ void main() { }); test('Update note fail changed on server', () async { + await deleteAllNotes(); final response = await client.notes.createNote(title: 'a'); expect(response.statusCode, 200); expect(() => response.headers, isA()); @@ -131,6 +144,7 @@ void main() { }); test('Delete note', () async { + await deleteAllNotes(); final id = (await client.notes.createNote(title: 'a')).body.id; var response = await client.notes.getNotes(); @@ -148,18 +162,16 @@ void main() { expect(response.body, hasLength(0)); }); - test('Get settings', () async { - final response = await client.notes.getSettings(); + test('Get and update settings', () async { + var response = await client.notes.getSettings(); expect(response.statusCode, 200); expect(() => response.headers, isA()); expect(response.body.notesPath, 'Notes'); expect(response.body.fileSuffix, '.md'); expect(response.body.noteMode, notes.Settings_NoteMode.rich); - }); - test('Update settings', () async { - var response = await client.notes.updateSettings( + response = await client.notes.updateSettings( settings: notes.Settings( (final b) => b ..notesPath = 'Test Notes' diff --git a/packages/nextcloud/test/notifications_test.dart b/packages/nextcloud/test/notifications_test.dart index 54ecfd80ccb..347721fc7f0 100644 --- a/packages/nextcloud/test/notifications_test.dart +++ b/packages/nextcloud/test/notifications_test.dart @@ -13,14 +13,14 @@ void main() { (final preset) { late DockerContainer container; late NextcloudClient client; - setUp(() async { + setUpAll(() async { container = await DockerContainer.create(preset); client = await TestNextcloudClient.create( container, username: 'admin', ); }); - tearDown(() async { + tearDownAll(() async { if (Invoker.current!.liveTest.errors.isNotEmpty) { print(await container.allLogs()); } @@ -42,41 +42,49 @@ void main() { }); group('Endpoint', () { + setUp(() async { + await client.notifications.endpoint.deleteAllNotifications(); + }); + test('List notifications', () async { await sendTestNotification(); final startTime = DateTime.now().toUtc(); - final response = (await client.notifications.endpoint.listNotifications()).body; - expect(response.ocs.data, hasLength(2)); - expect(response.ocs.data[0].notificationId, 2); - expect(response.ocs.data[0].app, 'admin_notifications'); - expect(response.ocs.data[0].user, 'admin'); + final response = await client.notifications.endpoint.listNotifications(); + expect(response.body.ocs.data, hasLength(1)); + expect(response.body.ocs.data[0].notificationId, isPositive); + expect(response.body.ocs.data[0].app, 'admin_notifications'); + expect(response.body.ocs.data[0].user, 'admin'); expect( - DateTime.parse(response.ocs.data[0].datetime).millisecondsSinceEpoch, + DateTime.parse(response.body.ocs.data[0].datetime).millisecondsSinceEpoch, closeTo(startTime.millisecondsSinceEpoch, 10E3), ); - expect(response.ocs.data[0].objectType, 'admin_notifications'); - expect(response.ocs.data[0].objectId, isNotNull); - expect(response.ocs.data[0].subject, '123'); - expect(response.ocs.data[0].message, '456'); - expect(response.ocs.data[0].link, ''); - expect(response.ocs.data[0].subjectRich, ''); - expect(response.ocs.data[0].subjectRichParameters, isEmpty); - expect(response.ocs.data[0].messageRich, ''); - expect(response.ocs.data[0].messageRichParameters, isEmpty); - expect(response.ocs.data[0].icon, isNotEmpty); - expect(response.ocs.data[0].actions, hasLength(0)); + expect(response.body.ocs.data[0].objectType, 'admin_notifications'); + expect(response.body.ocs.data[0].objectId, isNotNull); + expect(response.body.ocs.data[0].subject, '123'); + expect(response.body.ocs.data[0].message, '456'); + expect(response.body.ocs.data[0].link, ''); + expect(response.body.ocs.data[0].subjectRich, ''); + expect(response.body.ocs.data[0].subjectRichParameters, isEmpty); + expect(response.body.ocs.data[0].messageRich, ''); + expect(response.body.ocs.data[0].messageRichParameters, isEmpty); + expect(response.body.ocs.data[0].icon, isNotEmpty); + expect(response.body.ocs.data[0].actions, hasLength(0)); }); test('Get notification', () async { await sendTestNotification(); + final listResponse = await client.notifications.endpoint.listNotifications(); + expect(listResponse.body.ocs.data, hasLength(1)); final startTime = DateTime.now().toUtc(); - final response = await client.notifications.endpoint.getNotification(id: 2); + final response = await client.notifications.endpoint.getNotification( + id: listResponse.body.ocs.data.first.notificationId, + ); expect(response.statusCode, 200); expect(() => response.headers, isA()); - expect(response.body.ocs.data.notificationId, 2); + expect(response.body.ocs.data.notificationId, isPositive); expect(response.body.ocs.data.app, 'admin_notifications'); expect(response.body.ocs.data.user, 'admin'); expect( @@ -98,10 +106,12 @@ void main() { test('Delete notification', () async { await sendTestNotification(); - await client.notifications.endpoint.deleteNotification(id: 2); + final listResponse = await client.notifications.endpoint.listNotifications(); + expect(listResponse.body.ocs.data, hasLength(1)); + await client.notifications.endpoint.deleteNotification(id: listResponse.body.ocs.data.first.notificationId); - final response = (await client.notifications.endpoint.listNotifications()).body; - expect(response.ocs.data, hasLength(1)); + final response = await client.notifications.endpoint.listNotifications(); + expect(response.body.ocs.data, hasLength(0)); }); test('Delete all notifications', () async { @@ -109,28 +119,12 @@ void main() { await sendTestNotification(); await client.notifications.endpoint.deleteAllNotifications(); - final response = (await client.notifications.endpoint.listNotifications()).body; - expect(response.ocs.data, hasLength(0)); + final response = await client.notifications.endpoint.listNotifications(); + expect(response.body.ocs.data, hasLength(0)); }); }); group('Push', () { - late DockerContainer container; - late NextcloudClient client; - setUp(() async { - container = await DockerContainer.create(preset); - client = await TestNextcloudClient.create( - container, - username: 'admin', - ); - }); - tearDown(() async { - if (Invoker.current!.liveTest.errors.isNotEmpty) { - print(await container.allLogs()); - } - container.destroy(); - }); - // The key size has to be 2048, other sizes are not accepted by Nextcloud (at the moment at least) // ignore: avoid_redundant_argument_values RSAKeypair generateKeypair() => RSAKeypair.fromRandom(keySize: 2048); diff --git a/packages/nextcloud/test/provisioning_api_test.dart b/packages/nextcloud/test/provisioning_api_test.dart index 9c6946a7236..f93bacb923b 100644 --- a/packages/nextcloud/test/provisioning_api_test.dart +++ b/packages/nextcloud/test/provisioning_api_test.dart @@ -11,14 +11,14 @@ void main() { (final preset) { late DockerContainer container; late NextcloudClient client; - setUp(() async { + setUpAll(() async { container = await DockerContainer.create(preset); client = await TestNextcloudClient.create( container, username: 'admin', ); }); - tearDown(() async { + tearDownAll(() async { if (Invoker.current!.liveTest.errors.isNotEmpty) { print(await container.allLogs()); } diff --git a/packages/nextcloud/test/settings_test.dart b/packages/nextcloud/test/settings_test.dart index 3c4d87f0cd1..224db6f3b3a 100644 --- a/packages/nextcloud/test/settings_test.dart +++ b/packages/nextcloud/test/settings_test.dart @@ -13,14 +13,14 @@ void main() { (final preset) { late DockerContainer container; late NextcloudClient client; - setUp(() async { + setUpAll(() async { container = await DockerContainer.create(preset); client = await TestNextcloudClient.create( container, username: 'admin', ); }); - tearDown(() async { + tearDownAll(() async { if (Invoker.current!.liveTest.errors.isNotEmpty) { print(await container.allLogs()); } diff --git a/packages/nextcloud/test/spreed_test.dart b/packages/nextcloud/test/spreed_test.dart index 676e040ae4d..4df065bd68a 100644 --- a/packages/nextcloud/test/spreed_test.dart +++ b/packages/nextcloud/test/spreed_test.dart @@ -16,11 +16,11 @@ void main() { (final preset) { late DockerContainer container; late NextcloudClient client1; - setUp(() async { + setUpAll(() async { container = await DockerContainer.create(preset); client1 = await TestNextcloudClient.create(container); }); - tearDown(() async { + tearDownAll(() async { if (Invoker.current!.liveTest.errors.isNotEmpty) { print(await container.allLogs()); } @@ -72,13 +72,14 @@ void main() { test('Get rooms', () async { final response = await client1.spreed.room.getRooms(); expect(response.body.ocs.data, isNotEmpty); - expect(response.body.ocs.data[0].id, 1); - expect(response.body.ocs.data[0].token, isNotEmpty); - expect(response.body.ocs.data[0].type, spreed.RoomType.changelog.value); - expect(response.body.ocs.data[0].name, 'user1'); - expect(response.body.ocs.data[0].displayName, 'Talk updates ✅'); - expect(response.body.ocs.data[0].participantType, spreed.ParticipantType.user.value); - expect(spreed.ParticipantPermission.values.byBinary(response.body.ocs.data[0].permissions), { + final room = response.body.ocs.data.singleWhere((final room) => room.type == spreed.RoomType.changelog.value); + expect(room.id, isPositive); + expect(room.token, isNotEmpty); + expect(room.type, spreed.RoomType.changelog.value); + expect(room.name, 'user1'); + expect(room.displayName, 'Talk updates ✅'); + expect(room.participantType, spreed.ParticipantType.user.value); + expect(spreed.ParticipantPermission.values.byBinary(room.permissions), { spreed.ParticipantPermission.startCall, spreed.ParticipantPermission.joinCall, spreed.ParticipantPermission.canPublishAudio, @@ -110,7 +111,7 @@ void main() { roomType: spreed.RoomType.oneToOne.value, invite: 'user2', ); - expect(response.body.ocs.data.id, 1); + expect(response.body.ocs.data.id, isPositive); expect(response.body.ocs.data.token, isNotEmpty); expect(response.body.ocs.data.type, spreed.RoomType.oneToOne.value); expect(response.body.ocs.data.name, 'user2'); @@ -132,7 +133,7 @@ void main() { roomType: spreed.RoomType.group.value, invite: 'admin', ); - expect(response.body.ocs.data.id, 1); + expect(response.body.ocs.data.id, isPositive); expect(response.body.ocs.data.token, isNotEmpty); expect(response.body.ocs.data.type, spreed.RoomType.group.value); expect(response.body.ocs.data.name, 'admin'); @@ -154,7 +155,7 @@ void main() { roomType: spreed.RoomType.public.value, roomName: 'abc', ); - expect(response.body.ocs.data.id, 1); + expect(response.body.ocs.data.id, isPositive); expect(response.body.ocs.data.token, isNotEmpty); expect(response.body.ocs.data.type, spreed.RoomType.public.value); expect(response.body.ocs.data.name, 'abc'); @@ -176,19 +177,13 @@ void main() { group('Chat', () { test('Send message', () async { final startTime = DateTime.now(); - final room = (await client1.spreed.room.createRoom( - roomType: spreed.RoomType.oneToOne.value, - invite: 'user2', - )) - .body - .ocs - .data; + final room = await createTestRoom(); final response = await client1.spreed.chat.sendMessage( token: room.token, message: 'bla', ); - expect(response.body.ocs.data!.id, 2); + expect(response.body.ocs.data!.id, isPositive); expect(response.body.ocs.data!.actorType, spreed.ActorType.users.name); expect(response.body.ocs.data!.actorId, 'user1'); expect(response.body.ocs.data!.actorDisplayName, 'User One'); @@ -200,13 +195,7 @@ void main() { group('Get messages', () { test('Directly', () async { final startTime = DateTime.now(); - final room = (await client1.spreed.room.createRoom( - roomType: spreed.RoomType.oneToOne.value, - invite: 'user2', - )) - .body - .ocs - .data; + final room = await createTestRoom(); await client1.spreed.chat.sendMessage( token: room.token, message: '123', @@ -224,12 +213,12 @@ void main() { token: room.token, lookIntoFuture: 0, ); - expect(response.headers.xChatLastGiven, '1'); - expect(response.headers.xChatLastCommonRead, '1'); + expect(response.headers.xChatLastGiven, isNotEmpty); + expect(response.headers.xChatLastCommonRead, isNotEmpty); expect(response.body.ocs.data, hasLength(3)); - expect(response.body.ocs.data[0].id, 3); + expect(response.body.ocs.data[0].id, isPositive); expect(response.body.ocs.data[0].actorType, spreed.ActorType.users.name); expect(response.body.ocs.data[0].actorId, 'user1'); expect(response.body.ocs.data[0].actorDisplayName, 'User One'); @@ -237,7 +226,7 @@ void main() { expect(response.body.ocs.data[0].message, '123'); expect(response.body.ocs.data[0].messageType, spreed.MessageType.comment.name); - expect(response.body.ocs.data[0].parent!.id, 2); + expect(response.body.ocs.data[0].parent!.id, isPositive); expect(response.body.ocs.data[0].parent!.actorType, spreed.ActorType.users.name); expect(response.body.ocs.data[0].parent!.actorId, 'user1'); expect(response.body.ocs.data[0].parent!.actorDisplayName, 'User One'); @@ -248,7 +237,7 @@ void main() { expect(response.body.ocs.data[0].parent!.message, 'bla'); expect(response.body.ocs.data[0].parent!.messageType, spreed.MessageType.comment.name); - expect(response.body.ocs.data[1].id, 2); + expect(response.body.ocs.data[1].id, isPositive); expect(response.body.ocs.data[1].actorType, spreed.ActorType.users.name); expect(response.body.ocs.data[1].actorId, 'user1'); expect(response.body.ocs.data[1].actorDisplayName, 'User One'); @@ -256,7 +245,7 @@ void main() { expect(response.body.ocs.data[1].message, 'bla'); expect(response.body.ocs.data[1].messageType, spreed.MessageType.comment.name); - expect(response.body.ocs.data[2].id, 1); + expect(response.body.ocs.data[2].id, isPositive); expect(response.body.ocs.data[2].actorType, spreed.ActorType.users.name); expect(response.body.ocs.data[2].actorId, 'user1'); expect(response.body.ocs.data[2].actorDisplayName, 'User One'); @@ -293,7 +282,7 @@ void main() { lastKnownMessageId: message.id, ); expect(response.body.ocs.data, hasLength(1)); - expect(response.body.ocs.data[0].id, 3); + expect(response.body.ocs.data[0].id, isPositive); expect(response.body.ocs.data[0].actorType, spreed.ActorType.users.name); expect(response.body.ocs.data[0].actorId, 'user1'); expect(response.body.ocs.data[0].actorDisplayName, 'User One'); @@ -363,13 +352,7 @@ void main() { }); test('Send and receive messages', () async { - final room = (await client1.spreed.room.createRoom( - roomType: spreed.RoomType.oneToOne.value, - invite: 'user2', - )) - .body - .ocs - .data; + final room = await createTestRoom(); final room1 = (await client1.spreed.room.joinRoom(token: room.token)).body.ocs.data; await client1.spreed.call.joinCall(token: room.token); diff --git a/packages/nextcloud/test/uppush_test.dart b/packages/nextcloud/test/uppush_test.dart index ac255c2e209..c163b5214af 100644 --- a/packages/nextcloud/test/uppush_test.dart +++ b/packages/nextcloud/test/uppush_test.dart @@ -11,14 +11,14 @@ void main() { (final preset) { late DockerContainer container; late NextcloudClient client; - setUp(() async { + setUpAll(() async { container = await DockerContainer.create(preset); client = await TestNextcloudClient.create( container, username: 'admin', ); }); - tearDown(() async { + tearDownAll(() async { if (Invoker.current!.liveTest.errors.isNotEmpty) { print(await container.allLogs()); } diff --git a/packages/nextcloud/test/user_status_test.dart b/packages/nextcloud/test/user_status_test.dart index 70a9decafd6..557c89abde1 100644 --- a/packages/nextcloud/test/user_status_test.dart +++ b/packages/nextcloud/test/user_status_test.dart @@ -11,17 +11,22 @@ void main() { (final preset) { late DockerContainer container; late NextcloudClient client; - setUp(() async { + setUpAll(() async { container = await DockerContainer.create(preset); client = await TestNextcloudClient.create(container); }); - tearDown(() async { + tearDownAll(() async { if (Invoker.current!.liveTest.errors.isNotEmpty) { print(await container.allLogs()); } container.destroy(); }); + Future resetStatus() async { + await client.userStatus.userStatus.setStatus(statusType: 'online'); + await client.userStatus.userStatus.clearMessage(); + } + group('Predefined status', () { test('Find all', () async { final expectedStatusIDs = ['meeting', 'commuting', 'remote-work', 'sick-leave', 'vacationing']; @@ -60,6 +65,8 @@ void main() { group('User status', () { test('Set', () async { + await resetStatus(); + final response = await client.userStatus.userStatus.setStatus(statusType: 'online'); expect(response.statusCode, 200); expect(() => response.headers, isA()); @@ -75,9 +82,7 @@ void main() { }); test('Get', () async { - // There seems to be a bug in Nextcloud which makes getting the status fail before it has been set once. - // The error message from Nextcloud is "Could not create folder" - await client.userStatus.userStatus.setStatus(statusType: 'online'); + await resetStatus(); final response = await client.userStatus.userStatus.getStatus(); expect(response.statusCode, 200); @@ -94,8 +99,7 @@ void main() { }); test('Find', () async { - // Same as getting status - await client.userStatus.userStatus.setStatus(statusType: 'online'); + await resetStatus(); final response = await client.userStatus.statuses.find(userId: 'user1'); expect(response.statusCode, 200); @@ -109,6 +113,8 @@ void main() { }); test('Set predefined message', () async { + await resetStatus(); + final clearAt = DateTime.now().millisecondsSinceEpoch ~/ 1000 + 60; final response = await client.userStatus.userStatus.setPredefinedMessage( messageId: 'meeting', @@ -123,11 +129,13 @@ void main() { expect(response.body.ocs.data.messageIsPredefined, true); expect(response.body.ocs.data.icon, null); expect(response.body.ocs.data.clearAt, clearAt); - expect(response.body.ocs.data.status, 'offline'); - expect(response.body.ocs.data.statusIsUserDefined, false); + expect(response.body.ocs.data.status, 'online'); + expect(response.body.ocs.data.statusIsUserDefined, true); }); test('Set custom message', () async { + await resetStatus(); + final clearAt = DateTime.now().millisecondsSinceEpoch ~/ 1000 + 60; final response = await client.userStatus.userStatus.setCustomMessage( statusIcon: '😀', @@ -143,11 +151,13 @@ void main() { expect(response.body.ocs.data.messageIsPredefined, false); expect(response.body.ocs.data.icon, '😀'); expect(response.body.ocs.data.clearAt, clearAt); - expect(response.body.ocs.data.status, 'offline'); - expect(response.body.ocs.data.statusIsUserDefined, false); + expect(response.body.ocs.data.status, 'online'); + expect(response.body.ocs.data.statusIsUserDefined, true); }); test('Clear message', () async { + await resetStatus(); + final clearAt = DateTime.now().millisecondsSinceEpoch ~/ 1000 + 60; await client.userStatus.userStatus.setCustomMessage( statusIcon: '😀', @@ -166,21 +176,16 @@ void main() { expect(response.body.ocs.data.messageIsPredefined, false); expect(response.body.ocs.data.icon, null); expect(response.body.ocs.data.clearAt, null); - expect(response.body.ocs.data.status, 'offline'); - expect(response.body.ocs.data.statusIsUserDefined, false); + expect(response.body.ocs.data.status, 'online'); + expect(response.body.ocs.data.statusIsUserDefined, true); }); }); group('Statuses', () { test('Find all', () async { - var response = await client.userStatus.statuses.findAll(); - expect(response.statusCode, 200); - expect(() => response.headers, isA()); - expect(response.body.ocs.data, hasLength(0)); - - await client.userStatus.userStatus.setStatus(statusType: 'online'); + await resetStatus(); - response = await client.userStatus.statuses.findAll(); + final response = await client.userStatus.statuses.findAll(); expect(response.statusCode, 200); expect(() => response.headers, isA()); expect(response.body.ocs.data, hasLength(1)); @@ -194,6 +199,8 @@ void main() { group('Heartbeat', () { test('Heartbeat', () async { + await resetStatus(); + final response = await client.userStatus.heartbeat.heartbeat(status: 'online'); expect(response.statusCode, 200); expect(() => response.headers, isA()); @@ -205,7 +212,7 @@ void main() { expect(response.body.ocs.data.icon, null); expect(response.body.ocs.data.clearAt, null); expect(response.body.ocs.data.status, 'online'); - expect(response.body.ocs.data.statusIsUserDefined, false); + expect(response.body.ocs.data.statusIsUserDefined, true); }); }); }, diff --git a/packages/nextcloud/test/webdav_test.dart b/packages/nextcloud/test/webdav_test.dart index 7052913ef0f..de91a7c7d7e 100644 --- a/packages/nextcloud/test/webdav_test.dart +++ b/packages/nextcloud/test/webdav_test.dart @@ -142,11 +142,11 @@ void main() { late DockerContainer container; late NextcloudClient client; - setUp(() async { + setUpAll(() async { container = await DockerContainer.create(preset); client = await TestNextcloudClient.create(container); }); - tearDown(() async { + tearDownAll(() async { if (Invoker.current!.liveTest.errors.isNotEmpty) { print(await container.allLogs()); } @@ -267,11 +267,11 @@ void main() { test('Get directory props', () async { final data = utf8.encode('test'); - await client.webdav.mkcol(PathUri.parse('test')); - await client.webdav.put(data, PathUri.parse('test/test.txt')); + await client.webdav.mkcol(PathUri.parse('dir-props')); + await client.webdav.put(data, PathUri.parse('dir-props/test.txt')); final response = (await client.webdav.propfind( - PathUri.parse('test'), + PathUri.parse('dir-props'), prop: WebDavPropWithoutValues.fromBools( davgetcontenttype: true, davgetlastmodified: true, @@ -283,7 +283,7 @@ void main() { .toWebDavFiles() .single; - expect(response.path, PathUri.parse('test/')); + expect(response.path, PathUri.parse('dir-props/')); expect(response.isCollection, isTrue); expect(response.mimeType, isNull); expect(response.size, data.lengthInBytes); @@ -291,7 +291,7 @@ void main() { response.lastModified!.millisecondsSinceEpoch, closeTo(DateTime.now().millisecondsSinceEpoch, 10E3), ); - expect(response.name, 'test'); + expect(response.name, 'dir-props'); expect(response.isDirectory, isTrue); expect(response.props.davgetcontenttype, isNull); @@ -304,10 +304,10 @@ void main() { }); test('Filter files', () async { - final response = await client.webdav.put(utf8.encode('test'), PathUri.parse('test.txt')); + final response = await client.webdav.put(utf8.encode('test'), PathUri.parse('filter.txt')); final id = response.headers['oc-fileid']!.first; await client.webdav.proppatch( - PathUri.parse('test.txt'), + PathUri.parse('filter.txt'), set: WebDavProp( ocfavorite: 1, ), @@ -324,9 +324,9 @@ void main() { ), )) .responses; - expect(responses, hasLength(1)); + expect(responses, isNotEmpty); final props = - responses.singleWhere((final response) => response.href!.endsWith('/test.txt')).propstats.first.prop; + responses.singleWhere((final response) => response.href!.endsWith('/filter.txt')).propstats.first.prop; expect(props.ocid, id); expect(props.ocfavorite, 1); }); @@ -338,13 +338,13 @@ void main() { await client.webdav.put( utf8.encode('test'), - PathUri.parse('test.txt'), + PathUri.parse('set-props.txt'), lastModified: lastModifiedDate, created: createdDate, ); final updated = await client.webdav.proppatch( - PathUri.parse('test.txt'), + PathUri.parse('set-props.txt'), set: WebDavProp( ocfavorite: 1, ), @@ -352,7 +352,7 @@ void main() { expect(updated, isTrue); final props = (await client.webdav.propfind( - PathUri.parse('test.txt'), + PathUri.parse('set-props.txt'), prop: WebDavPropWithoutValues.fromBools( ocfavorite: true, davgetlastmodified: true, @@ -372,10 +372,10 @@ void main() { }); test('Remove properties', () async { - await client.webdav.put(utf8.encode('test'), PathUri.parse('test.txt')); + await client.webdav.put(utf8.encode('test'), PathUri.parse('remove-props.txt')); var updated = await client.webdav.proppatch( - PathUri.parse('test.txt'), + PathUri.parse('remove-props.txt'), set: WebDavProp( ocfavorite: 1, ), @@ -383,7 +383,7 @@ void main() { expect(updated, isTrue); var props = (await client.webdav.propfind( - PathUri.parse('test.txt'), + PathUri.parse('remove-props.txt'), prop: WebDavPropWithoutValues.fromBools( ocfavorite: true, nccreationtime: true, @@ -398,7 +398,7 @@ void main() { expect(props.ocfavorite, 1); updated = await client.webdav.proppatch( - PathUri.parse('test.txt'), + PathUri.parse('remove-props.txt'), remove: WebDavPropWithoutValues.fromBools( ocfavorite: true, ), @@ -406,7 +406,7 @@ void main() { expect(updated, isFalse); props = (await client.webdav.propfind( - PathUri.parse('test.txt'), + PathUri.parse('remove-props.txt'), prop: WebDavPropWithoutValues.fromBools( ocfavorite: true, ), @@ -428,11 +428,11 @@ void main() { await client.webdav.putFile( source, source.statSync(), - PathUri.parse('test.png'), + PathUri.parse('upload.png'), onProgress: progressValues.add, ); await client.webdav.getFile( - PathUri.parse('test.png'), + PathUri.parse('upload.png'), destination, onProgress: progressValues.add, ); @@ -477,15 +477,15 @@ void main() { }); test('delete', () async { - await client.webdav.put(Uint8List(0), PathUri.parse('test.txt')); + await client.webdav.put(Uint8List(0), PathUri.parse('delete.txt')); - final response = await client.webdav.delete(PathUri.parse('test.txt')); + final response = await client.webdav.delete(PathUri.parse('delete.txt')); expect(response.statusCode, 204); }); test('delete_null', () async { await expectLater( - () => client.webdav.delete(PathUri.parse('test.txt')), + () => client.webdav.delete(PathUri.parse('delete-null.txt')), throwsA(predicate((final e) => e.statusCode == 404)), ); }); @@ -493,23 +493,23 @@ void main() { // delete_fragment: This test is not applicable because the fragment is already removed on the client side test('mkcol', () async { - final response = await client.webdav.mkcol(PathUri.parse('test')); + final response = await client.webdav.mkcol(PathUri.parse('mkcol')); expect(response.statusCode, 201); }); test('mkcol_again', () async { - await client.webdav.mkcol(PathUri.parse('test')); + await client.webdav.mkcol(PathUri.parse('mkcol-again')); await expectLater( - () => client.webdav.mkcol(PathUri.parse('test')), + () => client.webdav.mkcol(PathUri.parse('mkcol-again')), throwsA(predicate((final e) => e.statusCode == 405)), ); }); test('delete_coll', () async { - var response = await client.webdav.mkcol(PathUri.parse('test')); + var response = await client.webdav.mkcol(PathUri.parse('delete-coll')); - response = await client.webdav.delete(PathUri.parse('test')); + response = await client.webdav.delete(PathUri.parse('delete-coll')); expect(response.statusCode, 204); }); @@ -525,110 +525,114 @@ void main() { group('copymove', () { test('copy_simple', () async { - await client.webdav.mkcol(PathUri.parse('src')); + await client.webdav.mkcol(PathUri.parse('copy-simple-src')); - final response = await client.webdav.copy(PathUri.parse('src'), PathUri.parse('dst')); + final response = + await client.webdav.copy(PathUri.parse('copy-simple-src'), PathUri.parse('copy-simple-dst')); expect(response.statusCode, 201); }); test('copy_overwrite', () async { - await client.webdav.mkcol(PathUri.parse('src')); - await client.webdav.mkcol(PathUri.parse('dst')); + await client.webdav.mkcol(PathUri.parse('copy-overwrite-src')); + await client.webdav.mkcol(PathUri.parse('copy-overwrite-dst')); await expectLater( - () => client.webdav.copy(PathUri.parse('src'), PathUri.parse('dst')), + () => client.webdav.copy(PathUri.parse('copy-overwrite-src'), PathUri.parse('copy-overwrite-dst')), throwsA(predicate((final e) => e.statusCode == 412)), ); - final response = await client.webdav.copy(PathUri.parse('src'), PathUri.parse('dst'), overwrite: true); + final response = await client.webdav + .copy(PathUri.parse('copy-overwrite-src'), PathUri.parse('copy-overwrite-dst'), overwrite: true); expect(response.statusCode, 204); }); test('copy_nodestcoll', () async { - await client.webdav.mkcol(PathUri.parse('src')); + await client.webdav.mkcol(PathUri.parse('copy-nodestcoll-src')); await expectLater( - () => client.webdav.copy(PathUri.parse('src'), PathUri.parse('nonesuch/dst')), + () => client.webdav.copy(PathUri.parse('copy-nodestcoll-src'), PathUri.parse('nonesuch/dst')), throwsA(predicate((final e) => e.statusCode == 409)), ); }); test('copy_coll', () async { - await client.webdav.mkcol(PathUri.parse('src')); - await client.webdav.mkcol(PathUri.parse('src/sub')); + await client.webdav.mkcol(PathUri.parse('copy-coll-src')); + await client.webdav.mkcol(PathUri.parse('copy-coll-src/sub')); for (var i = 0; i < 10; i++) { - await client.webdav.put(Uint8List(0), PathUri.parse('src/$i.txt')); + await client.webdav.put(Uint8List(0), PathUri.parse('copy-coll-src/$i.txt')); } - await client.webdav.copy(PathUri.parse('src'), PathUri.parse('dst1')); - await client.webdav.copy(PathUri.parse('src'), PathUri.parse('dst2')); + await client.webdav.copy(PathUri.parse('copy-coll-src'), PathUri.parse('copy-coll-dst1')); + await client.webdav.copy(PathUri.parse('copy-coll-src'), PathUri.parse('copy-coll-dst2')); await expectLater( - () => client.webdav.copy(PathUri.parse('src'), PathUri.parse('dst1')), + () => client.webdav.copy(PathUri.parse('copy-coll-src'), PathUri.parse('copy-coll-dst1')), throwsA(predicate((final e) => e.statusCode == 412)), ); - var response = await client.webdav.copy(PathUri.parse('src'), PathUri.parse('dst2'), overwrite: true); + var response = await client.webdav + .copy(PathUri.parse('copy-coll-src'), PathUri.parse('copy-coll-dst2'), overwrite: true); expect(response.statusCode, 204); for (var i = 0; i < 10; i++) { - response = await client.webdav.delete(PathUri.parse('dst1/$i.txt')); + response = await client.webdav.delete(PathUri.parse('copy-coll-dst1/$i.txt')); expect(response.statusCode, 204); } - response = await client.webdav.delete(PathUri.parse('dst1/sub')); + response = await client.webdav.delete(PathUri.parse('copy-coll-dst1/sub')); expect(response.statusCode, 204); - response = await client.webdav.delete(PathUri.parse('dst2')); + response = await client.webdav.delete(PathUri.parse('copy-coll-dst2')); expect(response.statusCode, 204); }); // copy_shallow: Does not work on litmus, let's wait for https://github.com/nextcloud/server/issues/39627 test('move', () async { - await client.webdav.put(Uint8List(0), PathUri.parse('src1.txt')); - await client.webdav.put(Uint8List(0), PathUri.parse('src2.txt')); - await client.webdav.mkcol(PathUri.parse('coll')); + await client.webdav.put(Uint8List(0), PathUri.parse('move-src1.txt')); + await client.webdav.put(Uint8List(0), PathUri.parse('move-src2.txt')); + await client.webdav.mkcol(PathUri.parse('move-coll')); - var response = await client.webdav.move(PathUri.parse('src1.txt'), PathUri.parse('dst.txt')); + var response = await client.webdav.move(PathUri.parse('move-src1.txt'), PathUri.parse('move-dst.txt')); expect(response.statusCode, 201); await expectLater( - () => client.webdav.move(PathUri.parse('src2.txt'), PathUri.parse('dst.txt')), + () => client.webdav.move(PathUri.parse('move-src2.txt'), PathUri.parse('move-dst.txt')), throwsA(predicate((final e) => e.statusCode == 412)), ); - response = await client.webdav.move(PathUri.parse('src2.txt'), PathUri.parse('dst.txt'), overwrite: true); + response = await client.webdav + .move(PathUri.parse('move-src2.txt'), PathUri.parse('move-dst.txt'), overwrite: true); expect(response.statusCode, 204); }); test('move_coll', () async { - await client.webdav.mkcol(PathUri.parse('src')); - await client.webdav.mkcol(PathUri.parse('src/sub')); + await client.webdav.mkcol(PathUri.parse('move-coll-src')); + await client.webdav.mkcol(PathUri.parse('move-coll-src/sub')); for (var i = 0; i < 10; i++) { - await client.webdav.put(Uint8List(0), PathUri.parse('src/$i.txt')); + await client.webdav.put(Uint8List(0), PathUri.parse('move-coll-src/$i.txt')); } - await client.webdav.put(Uint8List(0), PathUri.parse('noncoll')); - await client.webdav.copy(PathUri.parse('src'), PathUri.parse('dst2')); - await client.webdav.move(PathUri.parse('src'), PathUri.parse('dst1')); + await client.webdav.put(Uint8List(0), PathUri.parse('move-coll-noncoll')); + await client.webdav.copy(PathUri.parse('move-coll-src'), PathUri.parse('move-coll-dst2')); + await client.webdav.move(PathUri.parse('move-coll-src'), PathUri.parse('move-coll-dst1')); await expectLater( - () => client.webdav.move(PathUri.parse('dst1'), PathUri.parse('dst2')), + () => client.webdav.move(PathUri.parse('move-coll-dst1'), PathUri.parse('move-coll-dst2')), throwsA(predicate((final e) => e.statusCode == 412)), ); - await client.webdav.move(PathUri.parse('dst2'), PathUri.parse('dst1'), overwrite: true); - await client.webdav.copy(PathUri.parse('dst1'), PathUri.parse('dst2')); + await client.webdav.move(PathUri.parse('move-coll-dst2'), PathUri.parse('move-coll-dst1'), overwrite: true); + await client.webdav.copy(PathUri.parse('move-coll-dst1'), PathUri.parse('move-coll-dst2')); for (var i = 0; i < 10; i++) { - final response = await client.webdav.delete(PathUri.parse('dst1/$i.txt')); + final response = await client.webdav.delete(PathUri.parse('move-coll-dst1/$i.txt')); expect(response.statusCode, 204); } - final response = await client.webdav.delete(PathUri.parse('dst1/sub')); + final response = await client.webdav.delete(PathUri.parse('move-coll-dst1/sub')); expect(response.statusCode, 204); await expectLater( - () => client.webdav.move(PathUri.parse('dst2'), PathUri.parse('noncoll')), + () => client.webdav.move(PathUri.parse('move-coll-dst2'), PathUri.parse('move-coll-noncoll')), throwsA(predicate((final e) => e.statusCode == 412)), ); }); @@ -640,10 +644,10 @@ void main() { // large_put: Already covered by large_get test('large_get', () async { - final response = await client.webdav.put(Uint8List(largefileSize), PathUri.parse('test.txt')); + final response = await client.webdav.put(Uint8List(largefileSize), PathUri.parse('largefile.txt')); expect(response.statusCode, 201); - final downloadedContent = await client.webdav.get(PathUri.parse('test.txt')); + final downloadedContent = await client.webdav.get(PathUri.parse('largefile.txt')); expect(downloadedContent, hasLength(largefileSize)); }); });