Skip to content
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

API test for downloadFromShare #31458

Merged

Conversation

paurakhsharma
Copy link
Member

@paurakhsharma paurakhsharma commented May 16, 2018

Description

This PR adds more tests for download from share

Related Issue

#31531

How Has This Been Tested?

Locally

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Acceptance test

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

| /textfile0%20(2).txt |

Scenario: Downloading file inside the folder which is inside the user shared folder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not quite clear to me - do you have an example?

Copy link
Contributor

@phil-davis phil-davis May 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Download a file that is in a folder contained in a folder that has been shared with a user

And user "user1" has been created
And user "user0" creates a share using the API with settings
| path | PARENT |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the middle | line up also

| shareType | 0 |
| shareWith | user1 |
Then the user "user1" should be able to download the file "/CHILD/child.txt" using the API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed - this should give the full path like "/PARENT (2)/CHILD/child.txt"

Then the user "user1" should be able to download the file "/CHILD/child.txt" using the API

Scenario: Downloading file inside the folder which is inside the group shared folder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Download a file that is in a folder contained in a folder that has been shared with a group

Then the user "user1" should be able to download the file "/CHILD/child.txt" using the API

Scenario: Downloading file inside the folder which is inside the public shared folder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Download a file that is in a folder contained in a folder that has been shared with public

Then the public should be able to download the range "bytes=1-7" of file "/CHILD/child.txt" from inside the last public shared folder with password "publicpw" and the content should be "wnCloud"

Scenario: Downloading file inside the folder which is inside the user shared folder with share permission read/write
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make similar changes here to the words

@phil-davis
Copy link
Contributor

I think the first scenarios already default to read/write. So we should mention that.
And the last scenarios need to explicitly do read-only.

@paurakhsharma paurakhsharma force-pushed the API-test-downloadFromShare branch 2 times, most recently from 8124f90 to 90587ff Compare May 16, 2018 10:37
Copy link
Contributor

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: createShare.feature verifies that the share was created by testing that a file can be downloaded from the root folder of the share. So that means that createShare effectively has scenarios that test creating a share and being able to download from the share as a single scenario.

For that reason, the scenarios here in downloadFromShare are testing the case of downloading from a sub-folder inside the share - which is something different that needs to be tested.

@paurakhsharma
Copy link
Member Author

Backport on #31459

@paurakhsharma paurakhsharma force-pushed the API-test-downloadFromShare branch from 90587ff to 6fec518 Compare May 16, 2018 11:34
@codecov
Copy link

codecov bot commented May 16, 2018

Codecov Report

Merging #31458 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #31458   +/-   ##
=========================================
  Coverage     62.65%   62.65%           
  Complexity    18248    18248           
=========================================
  Files          1145     1145           
  Lines         68464    68464           
  Branches       1234     1234           
=========================================
  Hits          42897    42897           
  Misses        25206    25206           
  Partials        361      361
Flag Coverage Δ Complexity Δ
#javascript 52.05% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 63.86% <ø> (ø) 18248 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e79c8ba...6fec518. Read the comment docs.

@phil-davis phil-davis merged commit f5fc814 into owncloud:master May 16, 2018
@PVince81 PVince81 modified the milestones: development, QA Jun 13, 2018
@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants