From 35308d7685313d8fa6cef90cd47494b063119b0f Mon Sep 17 00:00:00 2001 From: prashant-gurung899 Date: Thu, 24 Oct 2024 12:30:50 +0545 Subject: [PATCH] add test to upload via TUS by federated user Signed-off-by: prashant-gurung899 --- .../acceptance/features/apiOcm/share.feature | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/acceptance/features/apiOcm/share.feature b/tests/acceptance/features/apiOcm/share.feature index f43c7cc2e7d..76cc154fd36 100755 --- a/tests/acceptance/features/apiOcm/share.feature +++ b/tests/acceptance/features/apiOcm/share.feature @@ -618,3 +618,30 @@ Feature: an user shares resources using ScienceMesh application } } """ + + @issue-10285 + Scenario: federated user upload file to a shared folder via TUS + Given using server "LOCAL" + And "Alice" has created the federation share invitation + And using server "REMOTE" + And "Brian" has accepted invitation + And using server "LOCAL" + And user "Alice" has created a folder "FOLDER" in space "Personal" + And user "Alice" has sent the following resource share invitation to federated user: + | resource | FOLDER | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + | federatedServer | @federation-ocis-server:10200 | + And using server "REMOTE" + And user "Brian" has created a new TUS resource on the WebDAV API with these headers: + | Upload-Length | 10 | + # L0ZPTERFUi90ZXh0RmlsZS50eHQ= is the base64 encode of /FOLDER/textFile.txt + | Upload-Metadata | filename L0ZPTERFUi90ZXh0RmlsZS50eHQ= | + | Tus-Resumable | 1.0.0 | + When user "Brian" sends a chunk to the last created TUS Location with offset "0" and data "123" using the WebDAV API + And user "Brian" sends a chunk to the last created TUS Location with offset "0" and data "000" using the WebDAV API + And user "Brian" sends a chunk to the last created TUS Location with offset "3" and data "4567890" using the WebDAV API + Then the HTTP status code should be "204" + And the content of file "/file.txt" for user "Brian" should be "1234567890"