-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tests-only][full-ci]Add api tests public link folder download #5232
[tests-only][full-ci]Add api tests public link folder download #5232
Conversation
e24c807
to
7db41d4
Compare
| name | someName | | ||
And user "Alice" has created a folder "NewFolder" in space "new-space" | ||
And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "NewFolder/test.txt" | ||
When public downloads the folder "NewFolder" of space "new-space" from the last created public link of "Alice" using the resource id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need suggestions on if this is an appropriate way to do this. Realistically, the public would never know the resource-id
of the file
But the archiver
endpoint used to download the folders takes with query params public-token
and fileid
If this is not appropriate we might need to add WebUI tests or any suggestions on better way to do this is welcomed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe the step can be only When public downloads the folder "NewFolder" of space "new-space" from the last created public link of "Alice"
And in step def, we can get the resource id. Also, I think the UI part may also does the same internally (but not sure - should be the same)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a real situation, "the public" has the link token. "The public" does a PROPFIND using the token (or some similar "get a list of resources" request), and a list of the resources (file and folders) in the public link share is returned. The data returned in the PROPFIND should have resource names and ids. If it does not have the id, then "the public" has to do another PROPFIND to the resource that they want, and get the id from that.
Does something like this work for "the public"?
If it does, then there is a way for "the public" to get the resource id. The test step can do the same sequence of requests. That will demonstrate that "the public" can really find out the file id, and then use it to access the archiver
endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phil-davis Thanks I'll try that and see if it works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phil-davis turns out we can propfind as a public with public files api https://doc.owncloud.com/server/next/developer_manual/webdav_api/public_files.html
I've updated the tests as well
bf253b5
to
574e447
Compare
tests/acceptance/features/apiSpacesShares/publicLinkDownload.feature
Outdated
Show resolved
Hide resolved
6f167c5
to
9e93267
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
e7dcd95
to
d1a2054
Compare
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Port to master is #5332 |
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: