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 to check that share can be made with file names more than 64 chars long #33009

Merged
merged 1 commit into from
Oct 5, 2018

Conversation

paurakhsharma
Copy link
Member

Description

This PR adds tests for sharing of files and folders with name longer than 64 characters

Related issue: #32763

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.

@paurakhsharma paurakhsharma added this to the development milestone Oct 4, 2018
@paurakhsharma paurakhsharma self-assigned this Oct 4, 2018
@paurakhsharma paurakhsharma changed the title API test to check that share can be made with file names more than 64… API test to check that share can be made with file names more than 66 chars long Oct 4, 2018
@paurakhsharma paurakhsharma changed the title API test to check that share can be made with file names more than 66 chars long API test to check that share can be made with file names more than 64 chars long Oct 4, 2018
@paurakhsharma
Copy link
Member Author

Backport on: #33010

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.

See comments. I feel like we should check that the receiver of the shared resource can really use it, because any of that might easily be broken when the names are long.

When user "user0" shares file "aquickbrownfoxjumpsoveraverylazydogaquickbrownfoxjumpsoveralazydog.txt" with user "user1" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the share fields of the last share should include
Copy link
Contributor

Choose a reason for hiding this comment

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

Also check that user1 can access the file

When user "user0" shares file "aquickbrownfoxjumpsoveraverylazydogaquickbrownfoxjumpsoveralazydog.txt" with group "grp1" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the share fields of the last share should include
Copy link
Contributor

Choose a reason for hiding this comment

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

create user1, put them in grp1, and make sure they can access the file

| 1 | 100 |
| 2 | 200 |

Scenario Outline: user create a public link share of a file with file name longer than 64 chars
Copy link
Contributor

Choose a reason for hiding this comment

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

s/create/creates

| 1 | 100 |
| 2 | 200 |

Scenario Outline: user create a public link share of a folder with folder name longer than 64 chars
Copy link
Contributor

Choose a reason for hiding this comment

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

s/create/creates

| path | /aquickbrownfoxjumpsoveraverylazydogaquickbrownfoxjumpsoveralazydog |
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the share fields of the last share should include
Copy link
Contributor

Choose a reason for hiding this comment

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

put a file in the folder, and check that the public can access the file

@codecov
Copy link

codecov bot commented Oct 4, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #33009   +/-   ##
=========================================
  Coverage     64.14%   64.14%           
  Complexity    18721    18721           
=========================================
  Files          1185     1185           
  Lines         70454    70454           
  Branches       1270     1270           
=========================================
  Hits          45195    45195           
  Misses        24889    24889           
  Partials        370      370
Flag Coverage Δ Complexity Δ
#javascript 52.89% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 65.42% <ø> (ø) 18721 <ø> (ø) ⬇️

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 df1eac1...4be3530. Read the comment docs.

@paurakhsharma paurakhsharma force-pushed the API-test-shareFilesAndFolderWithLongName branch 2 times, most recently from a76b274 to bca48a2 Compare October 4, 2018 10:57
@phil-davis phil-davis force-pushed the API-test-shareFilesAndFolderWithLongName branch from bca48a2 to 6def591 Compare October 5, 2018 00:06
@phil-davis phil-davis force-pushed the API-test-shareFilesAndFolderWithLongName branch from 6def591 to 4be3530 Compare October 5, 2018 03:18
@phil-davis phil-davis merged commit bb2e54e into master Oct 5, 2018
@phil-davis phil-davis deleted the API-test-shareFilesAndFolderWithLongName branch October 5, 2018 04:03
@lock lock bot locked as resolved and limited conversation to collaborators Oct 5, 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.

2 participants