Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
b17553d9
Commit
b17553d9
authored
9 years ago
by
Sergio Bertolin
Committed by
Morris Jobke
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added test case about downloading by range a public shared file
parent
7fefd4f4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/integration/features/bootstrap/WebDav.php
+18
-0
18 additions, 0 deletions
build/integration/features/bootstrap/WebDav.php
build/integration/features/webdav-related.feature
+9
-0
9 additions, 0 deletions
build/integration/features/webdav-related.feature
with
27 additions
and
0 deletions
build/integration/features/bootstrap/WebDav.php
+
18
−
0
View file @
b17553d9
...
@@ -72,6 +72,24 @@ trait WebDav{
...
@@ -72,6 +72,24 @@ trait WebDav{
$this
->
response
=
$this
->
makeDavRequest
(
$this
->
currentUser
,
"GET"
,
$fileSource
,
$headers
);
$this
->
response
=
$this
->
makeDavRequest
(
$this
->
currentUser
,
"GET"
,
$fileSource
,
$headers
);
}
}
/**
* @When /^Downloading last public shared file with range "([^"]*)"$/
*/
public
function
downloadPublicFileWithRange
(
$range
){
$token
=
$this
->
lastShareData
->
data
->
token
;
$fullUrl
=
substr
(
$this
->
baseUrl
,
0
,
-
4
)
.
"public.php/webdav"
;
$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 "([^"]*)"$/
* @Then /^Downloaded content should be "([^"]*)"$/
*/
*/
...
...
This diff is collapsed.
Click to expand it.
build/integration/features/webdav-related.feature
+
9
−
0
View file @
b17553d9
...
@@ -24,6 +24,15 @@ Feature: sharing
...
@@ -24,6 +24,15 @@ Feature: sharing
When
User
"user0"
uploads file
"data/textfile.txt"
to
"/asdf.txt"
When
User
"user0"
uploads file
"data/textfile.txt"
to
"/asdf.txt"
Then
the HTTP status code should be
"507"
Then
the HTTP status code should be
"507"
Scenario
:
download a public shared file with range
Given
user
"user0"
exists
And
As an
"user0"
When
creating a share with
|
path
|
welcome.txt
|
|
shareType
|
3
|
And
Downloading last public shared file with range
"bytes=51-77"
Then
Downloaded content should be
"example file for developers"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment