镜像来自
https://github.com/nextcloud/server.git
synced 2024-09-01 05:57:11 +02:00
Merge pull request #23978 from owncloud/integration-test-remaining-from-qa-26
Added test case about downloading a file inside a folder with range
This commit is contained in:
當前提交
2625d8fc71
@ -99,6 +99,25 @@ trait WebDav {
|
||||
$this->response = $client->send($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user