From bbc7c0f3dd446ea668229b4544c2161e0f4a8bbb Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Thu, 28 Jul 2016 15:47:04 +0200 Subject: [PATCH 1/3] ownCloud -> Nextcloud --- core/skeleton/welcome.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/skeleton/welcome.txt b/core/skeleton/welcome.txt index c86eaf91bb..5292711141 100644 --- a/core/skeleton/welcome.txt +++ b/core/skeleton/welcome.txt @@ -1,4 +1,4 @@ -Welcome to your ownCloud account! +Welcome to your Nextcloud account! This is just an example file for developers and git users. The packaged and released versions will come with better examples. From b7ce4e16869117a491d776b15057876debe4f2fa Mon Sep 17 00:00:00 2001 From: enoch85 Date: Thu, 28 Jul 2016 20:50:23 +0200 Subject: [PATCH 2/3] ownCloud --> Nextcloud --- build/integration/features/dav-v2.feature | 6 +++--- .../features/webdav-related.feature | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/build/integration/features/dav-v2.feature b/build/integration/features/dav-v2.feature index 2b3aeff945..0f3d77b099 100644 --- a/build/integration/features/dav-v2.feature +++ b/build/integration/features/dav-v2.feature @@ -30,18 +30,18 @@ Feature: dav-v2 |X-Permitted-Cross-Domain-Policies|none| |X-Robots-Tag|none| |X-XSS-Protection|1; mode=block| - And Downloaded content should start with "Welcome to your ownCloud account!" + And Downloaded content should start with "Welcome to your Nextcloud account!" Scenario: Doing a GET with a web login should work without CSRF token on the new backend Given Logging in using web as "admin" When Sending a "GET" to "/remote.php/dav/files/admin/welcome.txt" without requesttoken - Then Downloaded content should start with "Welcome to your ownCloud account!" + Then Downloaded content should start with "Welcome to your Nextcloud account!" Then the HTTP status code should be "200" Scenario: Doing a GET with a web login should work with CSRF token on the new backend Given Logging in using web as "admin" When Sending a "GET" to "/remote.php/dav/files/admin/welcome.txt" with requesttoken - Then Downloaded content should start with "Welcome to your ownCloud account!" + Then Downloaded content should start with "Welcome to your Nextcloud account!" Then the HTTP status code should be "200" Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the new backend diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature index a135f077f7..02b47679eb 100644 --- a/build/integration/features/webdav-related.feature +++ b/build/integration/features/webdav-related.feature @@ -90,18 +90,18 @@ Feature: webdav-related |X-Permitted-Cross-Domain-Policies|none| |X-Robots-Tag|none| |X-XSS-Protection|1; mode=block| - And Downloaded content should start with "Welcome to your ownCloud account!" + And Downloaded content should start with "Welcome to your Nextcloud account!" Scenario: Doing a GET with a web login should work without CSRF token on the old backend Given Logging in using web as "admin" When Sending a "GET" to "/remote.php/webdav/welcome.txt" without requesttoken - Then Downloaded content should start with "Welcome to your ownCloud account!" + Then Downloaded content should start with "Welcome to your Nextcloud account!" Then the HTTP status code should be "200" Scenario: Doing a GET with a web login should work with CSRF token on the old backend Given Logging in using web as "admin" When Sending a "GET" to "/remote.php/webdav/welcome.txt" with requesttoken - Then Downloaded content should start with "Welcome to your ownCloud account!" + Then Downloaded content should start with "Welcome to your Nextcloud account!" Then the HTTP status code should be "200" Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the old backend @@ -145,8 +145,8 @@ Feature: webdav-related Given user "user0" exists And user "user0" created a folder "/test" When as "user0" gets properties of folder "/test" with - |{http://owncloud.org/ns}share-types| - Then the response should contain an empty property "{http://owncloud.org/ns}share-types" + |{https://nextcloud.com/ns}share-types| + Then the response should contain an empty property "{https://nextcloud.com/ns}share-types" Scenario: A file that is shared to a user has a share-types property Given user "user0" exists @@ -158,7 +158,7 @@ Feature: webdav-related | permissions | 31 | | shareWith | user1 | When as "user0" gets properties of folder "/test" with - |{http://owncloud.org/ns}share-types| + |{https://nextcloud.com/ns}share-types| Then the response should contain a share-types property with | 0 | @@ -172,7 +172,7 @@ Feature: webdav-related | permissions | 31 | | shareWith | group1 | When as "user0" gets properties of folder "/test" with - |{http://owncloud.org/ns}share-types| + |{https://nextcloud.com/ns}share-types| Then the response should contain a share-types property with | 1 | @@ -184,7 +184,7 @@ Feature: webdav-related | shareType | 3 | | permissions | 31 | When as "user0" gets properties of folder "/test" with - |{http://owncloud.org/ns}share-types| + |{https://nextcloud.com/ns}share-types| Then the response should contain a share-types property with | 3 | @@ -208,7 +208,7 @@ Feature: webdav-related | shareType | 3 | | permissions | 31 | When as "user0" gets properties of folder "/test" with - |{http://owncloud.org/ns}share-types| + |{https://nextcloud.com/ns}share-types| Then the response should contain a share-types property with | 0 | | 1 | From 0529caee7c2115052c0325a3f15fdb55ada5d825 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 28 Jul 2016 23:46:36 +0200 Subject: [PATCH 3/3] Add some integration test fixes --- .../features/bootstrap/BasicStructure.php | 7 +++--- build/integration/features/dav-v2.feature | 2 +- build/integration/features/sharing-v1.feature | 10 ++++---- .../features/webdav-related.feature | 24 +++++++++---------- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php index 0999000f2e..80f24c6860 100644 --- a/build/integration/features/bootstrap/BasicStructure.php +++ b/build/integration/features/bootstrap/BasicStructure.php @@ -300,7 +300,7 @@ trait BasicStructure { */ public static function addFilesToSkeleton(){ for ($i=0; $i<5; $i++){ - file_put_contents("../../core/skeleton/" . "textfile" . "$i" . ".txt", "ownCloud test text file\n"); + file_put_contents("../../core/skeleton/" . "textfile" . "$i" . ".txt", "Nextcloud test text file\n"); } if (!file_exists("../../core/skeleton/FOLDER")) { mkdir("../../core/skeleton/FOLDER", 0777, true); @@ -308,11 +308,11 @@ trait BasicStructure { if (!file_exists("../../core/skeleton/PARENT")) { mkdir("../../core/skeleton/PARENT", 0777, true); } - file_put_contents("../../core/skeleton/PARENT/" . "parent.txt", "ownCloud test text file\n"); + file_put_contents("../../core/skeleton/PARENT/" . "parent.txt", "Nextcloud test text file\n"); if (!file_exists("../../core/skeleton/PARENT/CHILD")) { mkdir("../../core/skeleton/PARENT/CHILD", 0777, true); } - file_put_contents("../../core/skeleton/PARENT/CHILD/" . "child.txt", "ownCloud test text file\n"); + file_put_contents("../../core/skeleton/PARENT/CHILD/" . "child.txt", "Nextcloud test text file\n"); } /** @@ -335,4 +335,3 @@ trait BasicStructure { } } } - diff --git a/build/integration/features/dav-v2.feature b/build/integration/features/dav-v2.feature index 0f3d77b099..d2ac047b68 100644 --- a/build/integration/features/dav-v2.feature +++ b/build/integration/features/dav-v2.feature @@ -14,7 +14,7 @@ Feature: dav-v2 And As an "admin" And user "user0" exists And As an "user0" - When Downloading file "/files/user0/welcome.txt" with range "bytes=51-77" + When Downloading file "/files/user0/welcome.txt" with range "bytes=52-78" Then Downloaded content should be "example file for developers" Scenario: Downloading a file on the new endpoint should serve security headers diff --git a/build/integration/features/sharing-v1.feature b/build/integration/features/sharing-v1.feature index 75f98521e3..16d04e8133 100644 --- a/build/integration/features/sharing-v1.feature +++ b/build/integration/features/sharing-v1.feature @@ -312,8 +312,8 @@ Feature: sharing And As an "user1" When User "user1" deletes file "/textfile0 (2).txt" And As an "user3" - And Downloading file "/textfile0 (2).txt" with range "bytes=1-7" - Then Downloaded content should be "wnCloud" + And Downloading file "/textfile0 (2).txt" with range "bytes=1-8" + Then Downloaded content should be "extcloud" Scenario: getting share info of a share Given user "user0" exists @@ -500,9 +500,9 @@ 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 "/common/sub/textfile0.txt" with range "bytes=9-17" + When Downloading file "/common/sub/textfile0.txt" with range "bytes=10-18" Then Downloaded content should be "test text" - And Downloaded content when downloading file "/textfile0.txt" with range "bytes=9-17" should be "test text" + And Downloaded content when downloading file "/textfile0.txt" with range "bytes=10-18" should be "test text" And user "user2" should see following elements | /common/sub/textfile0.txt | @@ -521,7 +521,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=9-17" + When Downloading file "/textfile0.txt" with range "bytes=10-18" Then Downloaded content should be "test text" And user "user2" should see following elements | /common/sub/textfile0.txt | diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature index 02b47679eb..c49db4f8a5 100644 --- a/build/integration/features/webdav-related.feature +++ b/build/integration/features/webdav-related.feature @@ -12,7 +12,7 @@ Feature: webdav-related Scenario: download a file with range Given using dav path "remote.php/webdav" And As an "admin" - When Downloading file "/welcome.txt" with range "bytes=51-77" + When Downloading file "/welcome.txt" with range "bytes=52-78" Then Downloaded content should be "example file for developers" Scenario: Upload forbidden if quota is 0 @@ -39,7 +39,7 @@ Feature: webdav-related When user "user0" has a quota of "10 MB" Then as "user0" gets properties of folder "/" with |{DAV:}quota-available-bytes| - And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485429" + And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421" Scenario: Retrieving folder quota of shared folder with quota when no quota is set for recipient Given using dav path "remote.php/webdav" @@ -57,7 +57,7 @@ Feature: webdav-related | shareWith | user0 | Then as "user0" gets properties of folder "/testquota" with |{DAV:}quota-available-bytes| - And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485429" + And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421" Scenario: download a public shared file with range Given user "user0" exists @@ -65,7 +65,7 @@ Feature: webdav-related When creating a share with | path | welcome.txt | | shareType | 3 | - And Downloading last public shared file with range "bytes=51-77" + And Downloading last public shared file with range "bytes=52-78" Then Downloaded content should be "example file for developers" Scenario: download a public shared file inside a folder with range @@ -74,8 +74,8 @@ Feature: webdav-related When creating a share with | path | PARENT | | shareType | 3 | - And Downloading last public shared file inside a folder "/parent.txt" with range "bytes=1-7" - Then Downloaded content should be "wnCloud" + And Downloading last public shared file inside a folder "/parent.txt" with range "bytes=1-8" + Then Downloaded content should be "extcloud" Scenario: Downloading a file on the old endpoint should serve security headers Given using dav path "remote.php/webdav" @@ -145,8 +145,8 @@ Feature: webdav-related Given user "user0" exists And user "user0" created a folder "/test" When as "user0" gets properties of folder "/test" with - |{https://nextcloud.com/ns}share-types| - Then the response should contain an empty property "{https://nextcloud.com/ns}share-types" + |{http://owncloud.org/ns}share-types| + Then the response should contain an empty property "{http://owncloud.org/ns}share-types" Scenario: A file that is shared to a user has a share-types property Given user "user0" exists @@ -158,7 +158,7 @@ Feature: webdav-related | permissions | 31 | | shareWith | user1 | When as "user0" gets properties of folder "/test" with - |{https://nextcloud.com/ns}share-types| + |{http://owncloud.org/ns}share-types| Then the response should contain a share-types property with | 0 | @@ -172,7 +172,7 @@ Feature: webdav-related | permissions | 31 | | shareWith | group1 | When as "user0" gets properties of folder "/test" with - |{https://nextcloud.com/ns}share-types| + |{http://owncloud.org/ns}share-types| Then the response should contain a share-types property with | 1 | @@ -184,7 +184,7 @@ Feature: webdav-related | shareType | 3 | | permissions | 31 | When as "user0" gets properties of folder "/test" with - |{https://nextcloud.com/ns}share-types| + |{http://owncloud.org/ns}share-types| Then the response should contain a share-types property with | 3 | @@ -208,7 +208,7 @@ Feature: webdav-related | shareType | 3 | | permissions | 31 | When as "user0" gets properties of folder "/test" with - |{https://nextcloud.com/ns}share-types| + |{http://owncloud.org/ns}share-types| Then the response should contain a share-types property with | 0 | | 1 |