From e1c28c403def67a0f0bd08b741f642d253cfd62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 28 Jun 2018 16:36:19 +0200 Subject: [PATCH 1/2] Fix filenames in sharing integration tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a file is shared and the receiver of the share already has a file with the same name that file is left untouched, and "(2)" is appended to the name of the shared file. As "textfile0.txt" is included in the user folder skeleton all the users in the integration test have that file, so when it is shared the receiver sees the share as "/textfile0 (2).txt", and her own file as "/textfile0.txt". Signed-off-by: Daniel Calviño Sánchez --- build/integration/features/sharing-v1-part2.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/integration/features/sharing-v1-part2.feature b/build/integration/features/sharing-v1-part2.feature index 99cc5a8b98fe7..2bf1d3fb404f7 100644 --- a/build/integration/features/sharing-v1-part2.feature +++ b/build/integration/features/sharing-v1-part2.feature @@ -69,7 +69,7 @@ Feature: sharing And group "group1" exists And user "user1" belongs to group "group1" And file "textfile0.txt" of user "user0" is shared with group "group1" - And User "user1" moved file "/textfile0.txt" to "/FOLDER/textfile0.txt" + And User "user1" moved file "/textfile0 (2).txt" to "/FOLDER/textfile0.txt" And As an "user0" When Updating last share with | permissions | 1 | @@ -240,7 +240,7 @@ Feature: sharing And User "user1" moved file "/textfile0.txt" to "/common/textfile0.txt" And User "user1" moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt" And As an "user2" - When Downloading file "/textfile0.txt" with range "bytes=10-18" + When Downloading file "/textfile0 (2).txt" with range "bytes=10-18" Then Downloaded content should be "test text" And user "user2" should see following elements | /common/sub/textfile0.txt | @@ -252,7 +252,7 @@ Feature: sharing And group "group1" exists And user "user1" belongs to group "group1" And file "textfile0.txt" of user "user0" is shared with group "group1" - And User "user1" moved file "/textfile0.txt" to "/FOLDER/textfile0.txt" + And User "user1" moved file "/textfile0 (2).txt" to "/FOLDER/textfile0.txt" And As an "user0" And Deleting last share And As an "user1" From b506ec1c89e409561f9d22815d7647554754b962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 28 Jun 2018 16:45:42 +0200 Subject: [PATCH 2/2] Check all paths for own files and shares MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add "PARENT (2)" and its subdirectories to the paths to be checked, as before only the own "PARENT" folder was being checked, but not the shared one. Signed-off-by: Daniel Calviño Sánchez --- build/integration/features/sharing-v1-part2.feature | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/integration/features/sharing-v1-part2.feature b/build/integration/features/sharing-v1-part2.feature index 2bf1d3fb404f7..216b173cd104f 100644 --- a/build/integration/features/sharing-v1-part2.feature +++ b/build/integration/features/sharing-v1-part2.feature @@ -199,8 +199,14 @@ Feature: sharing Then user "user1" should see following elements | /FOLDER/ | | /PARENT/ | - | /CHILD/ | + | /PARENT/CHILD/ | | /PARENT/parent.txt | + | /PARENT/CHILD/child.txt | + | /PARENT%20(2)/ | + | /PARENT%20(2)/CHILD/ | + | /PARENT%20(2)/parent.txt | + | /PARENT%20(2)/CHILD/child.txt | + | /CHILD/ | | /CHILD/child.txt | And the HTTP status code should be "200"