From 386bb47c1166bf48d38368e2664c19ec482b70e0 Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Fri, 30 Jan 2026 12:40:02 +0100 Subject: [PATCH] api-test: upload-rename-download file with back slash --- tests/acceptance/config/behat.yml | 13 +----- .../expected-failures-decomposed-storage.md | 44 ++++++++++++------ .../expected-failures-posix-storage.md | 45 +++++++++++++------ .../moveFile.feature | 3 ++ .../moveFolder.feature | 3 ++ .../moveShareOnOpencloud.feature | 0 .../downloadFile.feature | 38 +++++++++++++++- .../createFileFolder.feature | 8 +++- tests/acceptance/scripts/run_api_tests.sh | 3 +- 9 files changed, 115 insertions(+), 42 deletions(-) rename tests/acceptance/features/{coreApiWebdavMove2 => coreApiWebdavMove}/moveFile.feature (99%) rename tests/acceptance/features/{coreApiWebdavMove1 => coreApiWebdavMove}/moveFolder.feature (98%) rename tests/acceptance/features/{coreApiWebdavMove2 => coreApiWebdavMove}/moveShareOnOpencloud.feature (100%) diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 1cbbe4918..20050dc68 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -681,18 +681,9 @@ default: - WebDavLockingContext: - WebDavPropertiesContext: - coreApiWebdavMove1: + coreApiWebdavMove: paths: - - "%paths.base%/../features/coreApiWebdavMove1" - context: *common_ldap_suite_context - contexts: - - FeatureContext: *common_feature_context_params - - WebDavPropertiesContext: - - TrashbinContext: - - coreApiWebdavMove2: - paths: - - "%paths.base%/../features/coreApiWebdavMove2" + - "%paths.base%/../features/coreApiWebdavMove" context: *common_ldap_suite_context contexts: - FeatureContext: *common_feature_context_params diff --git a/tests/acceptance/expected-failures-decomposed-storage.md b/tests/acceptance/expected-failures-decomposed-storage.md index 1fd60d34f..b0c362780 100644 --- a/tests/acceptance/expected-failures-decomposed-storage.md +++ b/tests/acceptance/expected-failures-decomposed-storage.md @@ -326,10 +326,10 @@ _ocdav: api compatibility, return correct status code_ #### [Renaming resource to banned name is allowed in spaces webdav](https://github.com/owncloud/ocis/issues/3099) -- [coreApiWebdavMove2/moveFile.feature:143](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L143) -- [coreApiWebdavMove1/moveFolder.feature:36](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L36) -- [coreApiWebdavMove1/moveFolder.feature:50](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L50) -- [coreApiWebdavMove1/moveFolder.feature:64](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L64) +- [coreApiWebdavMove/moveFile.feature:143](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L143) +- [coreApiWebdavMove/moveFolder.feature:36](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L36) +- [coreApiWebdavMove/moveFolder.feature:50](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L50) +- [coreApiWebdavMove/moveFolder.feature:64](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L64) #### [Trying to delete other user's trashbin item returns 409 for spaces path instead of 404](https://github.com/owncloud/ocis/issues/9791) @@ -337,15 +337,15 @@ _ocdav: api compatibility, return correct status code_ #### [MOVE a file into same folder with same name returns 404 instead of 403](https://github.com/owncloud/ocis/issues/1976) -- [coreApiWebdavMove2/moveFile.feature:100](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L100) -- [coreApiWebdavMove2/moveFile.feature:101](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L101) -- [coreApiWebdavMove2/moveFile.feature:102](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L102) -- [coreApiWebdavMove1/moveFolder.feature:217](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L217) -- [coreApiWebdavMove1/moveFolder.feature:218](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L218) -- [coreApiWebdavMove1/moveFolder.feature:219](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L219) -- [coreApiWebdavMove2/moveShareOnOpencloud.feature:334](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOpencloud.feature#L334) -- [coreApiWebdavMove2/moveShareOnOpencloud.feature:337](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOpencloud.feature#L337) -- [coreApiWebdavMove2/moveShareOnOpencloud.feature:340](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOpencloud.feature#L340) +- [coreApiWebdavMove/moveFile.feature:100](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L100) +- [coreApiWebdavMove/moveFile.feature:101](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L101) +- [coreApiWebdavMove/moveFile.feature:102](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L102) +- [coreApiWebdavMove/moveFolder.feature:220](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L220) +- [coreApiWebdavMove/moveFolder.feature:221](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L221) +- [coreApiWebdavMove/moveFolder.feature:222](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L222) +- [coreApiWebdavMove/moveShareOnOpencloud.feature:334](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveShareOnOpencloud.feature#L334) +- [coreApiWebdavMove/moveShareOnOpencloud.feature:337](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveShareOnOpencloud.feature#L337) +- [coreApiWebdavMove/moveShareOnOpencloud.feature:340](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveShareOnOpencloud.feature#L340) #### [COPY file/folder to same name is possible (but 500 code error for folder with spaces path)](https://github.com/owncloud/ocis/issues/8711) @@ -370,6 +370,24 @@ _ocdav: api compatibility, return correct status code_ - [coreApiWebdavPreviews/previews.feature:264](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L264) - [coreApiWebdavPreviews/previews.feature:265](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L265) +#### [Renaming a file with a slash in the filename makes the file inaccessible](https://github.com/opencloud-eu/web/issues/1893) + +- [coreApiWebdavProperties/createFileFolder.feature:29](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L29) +- [coreApiWebdavProperties/createFileFolder.feature:42](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L42) +- [coreApiWebdavProperties/createFileFolder.feature:148](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L148) +- [coreApiWebdavProperties/createFileFolder.feature:160](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L160) +- [coreApiWebdavProperties/createFileFolder.feature:172](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L172) + +- [coreApiWebdavMove/moveFile.feature:441](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L441) +- [coreApiWebdavMove/moveFile.feature:452](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L452) + +- [coreApiWebdavMove/moveFolder.feature:164](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L164) +- [coreApiWebdavMove/moveFolder.feature:179](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L179) + +- [coreApiWebdavOperations/downloadFile.feature:307](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature#L307) +- [coreApiWebdavOperations/downloadFile.feature:313](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature#L313) +- [coreApiWebdavOperations/downloadFile.feature:319](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature#L319) + ### Won't fix Not everything needs to be implemented for opencloud. diff --git a/tests/acceptance/expected-failures-posix-storage.md b/tests/acceptance/expected-failures-posix-storage.md index 93feeadc6..ea7c6de79 100644 --- a/tests/acceptance/expected-failures-posix-storage.md +++ b/tests/acceptance/expected-failures-posix-storage.md @@ -326,10 +326,10 @@ _ocdav: api compatibility, return correct status code_ #### [Renaming resource to banned name is allowed in spaces webdav](https://github.com/owncloud/ocis/issues/3099) -- [coreApiWebdavMove2/moveFile.feature:143](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L143) -- [coreApiWebdavMove1/moveFolder.feature:36](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L36) -- [coreApiWebdavMove1/moveFolder.feature:50](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L50) -- [coreApiWebdavMove1/moveFolder.feature:64](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L64) +- [coreApiWebdavMove/moveFile.feature:143](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L143) +- [coreApiWebdavMove/moveFolder.feature:36](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L36) +- [coreApiWebdavMove/moveFolder.feature:50](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L50) +- [coreApiWebdavMove/moveFolder.feature:64](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L64) #### [Trying to delete other user's trashbin item returns 409 for spaces path instead of 404](https://github.com/owncloud/ocis/issues/9791) @@ -337,15 +337,15 @@ _ocdav: api compatibility, return correct status code_ #### [MOVE a file into same folder with same name returns 404 instead of 403](https://github.com/owncloud/ocis/issues/1976) -- [coreApiWebdavMove2/moveFile.feature:100](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L100) -- [coreApiWebdavMove2/moveFile.feature:101](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L101) -- [coreApiWebdavMove2/moveFile.feature:102](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L102) -- [coreApiWebdavMove1/moveFolder.feature:217](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L217) -- [coreApiWebdavMove1/moveFolder.feature:218](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L218) -- [coreApiWebdavMove1/moveFolder.feature:219](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L219) -- [coreApiWebdavMove2/moveShareOnOpencloud.feature:334](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOpencloud.feature#L334) -- [coreApiWebdavMove2/moveShareOnOpencloud.feature:337](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOpencloud.feature#L337) -- [coreApiWebdavMove2/moveShareOnOpencloud.feature:340](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOpencloud.feature#L340) +- [coreApiWebdavMove/moveFile.feature:100](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L100) +- [coreApiWebdavMove/moveFile.feature:101](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L101) +- [coreApiWebdavMove/moveFile.feature:102](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L102) +- [coreApiWebdavMove/moveFolder.feature:220](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L220) +- [coreApiWebdavMove/moveFolder.feature:221](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L221) +- [coreApiWebdavMove/moveFolder.feature:222](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L222) +- [coreApiWebdavMove/moveShareOnOpencloud.feature:334](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveShareOnOpencloud.feature#L334) +- [coreApiWebdavMove/moveShareOnOpencloud.feature:337](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveShareOnOpencloud.feature#L337) +- [coreApiWebdavMove/moveShareOnOpencloud.feature:340](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveShareOnOpencloud.feature#L340) #### [COPY file/folder to same name is possible (but 500 code error for folder with spaces path)](https://github.com/owncloud/ocis/issues/8711) @@ -370,6 +370,25 @@ _ocdav: api compatibility, return correct status code_ - [coreApiWebdavPreviews/previews.feature:264](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L264) - [coreApiWebdavPreviews/previews.feature:265](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavPreviews/previews.feature#L265) + +#### [Renaming a file with a slash in the filename makes the file inaccessible](https://github.com/opencloud-eu/web/issues/1893) + +- [coreApiWebdavProperties/createFileFolder.feature:29](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L29) +- [coreApiWebdavProperties/createFileFolder.feature:42](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L42) +- [coreApiWebdavProperties/createFileFolder.feature:148](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L148) +- [coreApiWebdavProperties/createFileFolder.feature:160](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L160) +- [coreApiWebdavProperties/createFileFolder.feature:172](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L172) + +- [coreApiWebdavMove/moveFile.feature:441](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L441) +- [coreApiWebdavMove/moveFile.feature:452](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFile.feature#L452) + +- [coreApiWebdavMove/moveFolder.feature:164](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L164) +- [coreApiWebdavMove/moveFolder.feature:179](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature#L179) + +- [coreApiWebdavOperations/downloadFile.feature:307](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature#L307) +- [coreApiWebdavOperations/downloadFile.feature:313](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature#L313) +- [coreApiWebdavOperations/downloadFile.feature:319](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature#L319) + ### Won't fix Not everything needs to be implemented for opencloud. diff --git a/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature b/tests/acceptance/features/coreApiWebdavMove/moveFile.feature similarity index 99% rename from tests/acceptance/features/coreApiWebdavMove2/moveFile.feature rename to tests/acceptance/features/coreApiWebdavMove/moveFile.feature index 5b74a192a..60de31986 100644 --- a/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature +++ b/tests/acceptance/features/coreApiWebdavMove/moveFile.feature @@ -438,6 +438,7 @@ Feature: move (rename) file | old | "strängé नेपाली.txt" | "testfile.txt" | | old | "file,comma.txt" | "testfile.txt" | | old | " start with space.txt" | "testfile.txt" | + | old | "testfile.txt" | "with\backslash" | | new | "testfile.txt" | "'single'quotes.txt" | | new | "testfile.txt" | '"double"quotes.txt' | | new | "testfile.txt" | "strängé नेपाली.txt" | @@ -448,6 +449,7 @@ Feature: move (rename) file | new | "strängé नेपाली.txt" | "testfile.txt" | | new | "file,comma.txt" | "testfile.txt" | | new | " start with space.txt" | "testfile.txt" | + | new | "testfile.txt" | "with\backslash" | | spaces | "testfile.txt" | "'single'quotes.txt" | | spaces | "testfile.txt" | '"double"quotes.txt' | | spaces | "testfile.txt" | "strängé नेपाली.txt" | @@ -458,6 +460,7 @@ Feature: move (rename) file | spaces | "strängé नेपाली.txt" | "testfile.txt" | | spaces | "file,comma.txt" | "testfile.txt" | | spaces | " start with space.txt" | "testfile.txt" | + | spaces | "testfile.txt" | "with\backslash" | Scenario Outline: try to rename file to name having white space at the end diff --git a/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature b/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature similarity index 98% rename from tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature rename to tests/acceptance/features/coreApiWebdavMove/moveFolder.feature index ea73465e4..2d54594fe 100644 --- a/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature +++ b/tests/acceptance/features/coreApiWebdavMove/moveFolder.feature @@ -161,6 +161,7 @@ Feature: move (rename) folder | old | "Sample,Folder,With,Comma" | "testFolder" | | old | " start with space" | "testFolder" | | old | "renamed.part" | "testFolder" | + | old | "testFolder" | "with\backslash" | | new | "testFolder" | "'single'quotes" | | new | "testFolder" | '"double"quotes' | | new | "testFolder" | "strängé नेपाली folder" | @@ -175,6 +176,7 @@ Feature: move (rename) folder | new | "Sample,Folder,With,Comma" | "testFolder" | | new | " start with space" | "testFolder" | | new | "renamed.part" | "testFolder" | + | new | "testFolder" | "with\backslash" | | spaces | "testFolder" | "'single'quotes" | | spaces | "testFolder" | '"double"quotes' | | spaces | "testFolder" | "strängé नेपाली folder" | @@ -189,6 +191,7 @@ Feature: move (rename) folder | spaces | "Sample,Folder,With,Comma" | "testFolder" | | spaces | " start with space" | "testFolder" | | spaces | "renamed.part" | "testFolder" | + | spaces | "testFolder" | "with\backslash" | Scenario Outline: try to rename folder to name having white space at the end diff --git a/tests/acceptance/features/coreApiWebdavMove2/moveShareOnOpencloud.feature b/tests/acceptance/features/coreApiWebdavMove/moveShareOnOpencloud.feature similarity index 100% rename from tests/acceptance/features/coreApiWebdavMove2/moveShareOnOpencloud.feature rename to tests/acceptance/features/coreApiWebdavMove/moveShareOnOpencloud.feature diff --git a/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature b/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature index 06fbae9ca..90cb7c882 100644 --- a/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature +++ b/tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature @@ -5,12 +5,11 @@ Feature: download file Background: Given user "Alice" has been created with default attributes - And user "Alice" has uploaded file with content "OpenCloud test text file 0" to "/textfile0.txt" - And user "Alice" has uploaded file with content "Welcome this is just an example file for developers." to "/welcome.txt" @smokeTest Scenario Outline: download a file Given using DAV path + And user "Alice" has uploaded file with content "OpenCloud test text file 0" to "/textfile0.txt" When user "Alice" downloads file "/textfile0.txt" using the WebDAV API Then the HTTP status code should be "200" And the downloaded content should be "OpenCloud test text file 0" @@ -23,6 +22,7 @@ Feature: download file @issue-1346 Scenario Outline: download a file with range Given using DAV path + And user "Alice" has uploaded file with content "Welcome this is just an example file for developers." to "/welcome.txt" When user "Alice" downloads file "/welcome.txt" with range "bytes=24-50" using the WebDAV API Then the HTTP status code should be "206" And the downloaded content should be "example file for developers" @@ -112,6 +112,7 @@ Feature: download file Scenario Outline: download a file with single part ranges Given using DAV path + And user "Alice" has uploaded file with content "Welcome this is just an example file for developers." to "/welcome.txt" When user "Alice" downloads file "/welcome.txt" with range "bytes=0-51" using the WebDAV API Then the HTTP status code should be "206" And the following headers should be set @@ -128,6 +129,7 @@ Feature: download file Scenario Outline: download a file with multipart ranges Given using DAV path + And user "Alice" has uploaded file with content "Welcome this is just an example file for developers." to "/welcome.txt" When user "Alice" downloads file "/welcome.txt" with range "bytes=0-6, 40-51" using the WebDAV API Then the HTTP status code should be "206" or "200" And if the HTTP status code was "206" then the following headers should match these regular expressions @@ -155,6 +157,7 @@ Feature: download file Scenario Outline: download a file with last byte range out of bounds Given using DAV path + And user "Alice" has uploaded file with content "Welcome this is just an example file for developers." to "/welcome.txt" When user "Alice" downloads file "/welcome.txt" with range "bytes=0-55" using the WebDAV API Then the HTTP status code should be "206" And the downloaded content should be "Welcome this is just an example file for developers." @@ -167,6 +170,7 @@ Feature: download file Scenario Outline: download a range at the end of a file Given using DAV path + And user "Alice" has uploaded file with content "Welcome this is just an example file for developers." to "/welcome.txt" When user "Alice" downloads file "/welcome.txt" with range "bytes=-11" using the WebDAV API Then the HTTP status code should be "206" And the downloaded content should be "developers." @@ -179,6 +183,7 @@ Feature: download file Scenario Outline: download a file with range out of bounds Given using DAV path + And user "Alice" has uploaded file with content "Welcome this is just an example file for developers." to "/welcome.txt" When user "Alice" downloads file "/welcome.txt" with range "bytes=55-60" using the WebDAV API Then the HTTP status code should be "416" Examples: @@ -276,6 +281,7 @@ Feature: download file Scenario Outline: try to download recently deleted file Given using DAV path + And user "Alice" has uploaded file with content "OpenCloud test text file 0" to "/textfile0.txt" When user "Alice" deletes file "textfile0.txt" using the WebDAV API Then the HTTP status code should be "204" When user "Alice" tries to download file "textfile0.txt" using the WebDAV API @@ -285,3 +291,31 @@ Feature: download file | old | | new | | spaces | + + @web-issue-1893 + Scenario Outline: download a file with special characters in the filename + Given using DAV path + And user "Alice" has uploaded file with content "test file" to + When user "Alice" downloads file using the WebDAV API + Then the HTTP status code should be "200" + And the downloaded content should be "test file" + Examples: + | dav-path-version | file-name | + | old | "😀 🤖.txt" | + | old | "नेपाली" | + | old | "C++ file.cpp" | + | old | "with\backslash" | + | old | "file #2.txt" | + | old | "file ?2.pdf" | + | new | "😀 🤖.txt" | + | new | "नेपाली" | + | new | "C++ file.cpp" | + | new | "with\backslash" | + | new | "file #2.txt" | + | new | "file ?2.pdf" | + | spaces | "😀 🤖.txt" | + | spaces | "नेपाली" | + | spaces | "C++ file.cpp" | + | spaces | "with\backslash" | + | spaces | "file #2.txt" | + | spaces | "file ?2.pdf" | diff --git a/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature b/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature index 63b13b7ff..a183ad737 100644 --- a/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature +++ b/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature @@ -26,6 +26,7 @@ Feature: create files and folder | old | "Sample,comma" | | old | "'single'" | | old | '"double"' | + | old | "with\backslash" | | new | "upload" | | new | "strängé folder" | | new | "C++ folder.cpp" | @@ -38,6 +39,7 @@ Feature: create files and folder | new | "'single'" | | new | '"double"' | | new | "नेपाली" | + | new | "with\backslash" | | spaces | "upload" | | spaces | "strängé folder" | | spaces | "C++ folder.cpp" | @@ -49,6 +51,7 @@ Feature: create files and folder | spaces | "Sample,comma" | | spaces | "'single'" | | spaces | '"double"' | + | spaces | "with\backslash" | @smokeTest Scenario Outline: get resourcetype property of a folder @@ -122,7 +125,7 @@ Feature: create files and folder | new | | spaces | - + @web-issue-1893 Scenario Outline: create a file Given using DAV path When user "Alice" uploads file with content "some text" to using the WebDAV API @@ -142,6 +145,7 @@ Feature: create files and folder | old | "Sample,comma.txt" | | old | "'single'.txt" | | old | '"double".txt' | + | old | "with\backslash" | | new | "upload.txt" | | new | "strängéfile.txt" | | new | "C++ file.cpp" | @@ -153,6 +157,7 @@ Feature: create files and folder | new | "Sample,comma.txt" | | new | "'single'.txt" | | new | '"double".txt' | + | new | "with\backslash" | | spaces | "upload.txt" | | spaces | "strängéfile.txt" | | spaces | "C++ file.cpp" | @@ -164,6 +169,7 @@ Feature: create files and folder | spaces | "Sample,comma.txt" | | spaces | "'single'.txt" | | spaces | '"double".txt' | + | spaces | "with\backslash" | @issue-10339 @issue-9568 Scenario Outline: try to create file with '.', '..' and 'empty' diff --git a/tests/acceptance/scripts/run_api_tests.sh b/tests/acceptance/scripts/run_api_tests.sh index fc310a540..acfba7b51 100755 --- a/tests/acceptance/scripts/run_api_tests.sh +++ b/tests/acceptance/scripts/run_api_tests.sh @@ -90,8 +90,7 @@ CORE_SUITES=( "coreApiWebdavDelete" "coreApiWebdavEtagPropagation1" "coreApiWebdavEtagPropagation2" - "coreApiWebdavMove1" - "coreApiWebdavMove2" + "coreApiWebdavMove" "coreApiWebdavOperations" "coreApiWebdavPreviews" "coreApiWebdavProperties"