diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-04-16 23:34:53 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-04-16 23:34:53 +0200 |
commit | 2625d8fc717936cc18a04ff3dfa07e55dc71a6d0 (patch) | |
tree | 35b688e1109f52bbfc5c0705fd112af69ca8b3a1 /build | |
parent | 2d84e9c5fa6d628ab1fc86923f8b4e003709d61a (diff) | |
parent | ab40ec649476956c92efc261cb47a9a053351c7c (diff) | |
download | nextcloud-server-2625d8fc717936cc18a04ff3dfa07e55dc71a6d0.tar.gz nextcloud-server-2625d8fc717936cc18a04ff3dfa07e55dc71a6d0.zip |
Merge pull request #23978 from owncloud/integration-test-remaining-from-qa-26
Added test case about downloading a file inside a folder with range
Diffstat (limited to 'build')
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 19 | ||||
-rw-r--r-- | build/integration/features/webdav-related.feature | 9 |
2 files changed, 28 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index 0ca2a411c75..79c447ac573 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -100,6 +100,25 @@ trait WebDav { } /** + * @When /^Downloading last public shared file inside a folder "([^"]*)" with range "([^"]*)"$/ + * @param string $range + */ + public function downloadPublicFileInsideAFolderWithRange($path, $range){ + $token = $this->lastShareData->data->token; + $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav" . "$path"; + $headers['Range'] = $range; + + $client = new GClient(); + $options = []; + $options['auth'] = [$token, ""]; + + $request = $client->createRequest("GET", $fullUrl, $options); + $request->addHeader('Range', $range); + + $this->response = $client->send($request); + } + + /** * @Then /^Downloaded content should be "([^"]*)"$/ * @param string $content */ diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature index f1c99444f6d..abdc63935e9 100644 --- a/build/integration/features/webdav-related.feature +++ b/build/integration/features/webdav-related.feature @@ -68,6 +68,15 @@ Feature: webdav-related And Downloading last public shared file with range "bytes=51-77" Then Downloaded content should be "example file for developers" + Scenario: download a public shared file inside a folder with range + Given user "user0" exists + And As an "user0" + 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" + Scenario: Downloading a file on the old endpoint should serve security headers Given using dav path "remote.php/webdav" And As an "admin" |