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

[Tests-only] Adjust public link tests for download, upload and other operations #37552

Merged
merged 1 commit into from
Jun 26, 2020

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Jun 18, 2020

Enabled some tests and tagged others that are not working yet.

For owncloud/ocis-reva#49.
A lot blocked by owncloud/ocis-reva#282

Still need to investigate some of the tests tagged with "issue-ocis-reva-49" where the download returns an empty string.

Raised and tagged issues:

TODOs:

  • investigate why remaining tests tagged with @issue-ocis-reva-49 are failing with empty downloads in apiSharePublicLink1/createPublicLinkShare.feature
  • process the other test files:

@codecov
Copy link

codecov bot commented Jun 18, 2020

Codecov Report

Merging #37552 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #37552      +/-   ##
============================================
- Coverage     64.67%   64.66%   -0.02%     
- Complexity    19339    19343       +4     
============================================
  Files          1279     1279              
  Lines         75573    75600      +27     
  Branches       1331     1333       +2     
============================================
+ Hits          48880    48885       +5     
- Misses        26301    26323      +22     
  Partials        392      392              
Flag Coverage Δ Complexity Δ
#javascript 54.03% <ø> (-0.11%) 0.00 <ø> (ø)
#phpunit 65.83% <ø> (-0.01%) 19343.00 <ø> (+4.00) ⬇️
Impacted Files Coverage Δ Complexity Δ
...s/dav/lib/Connector/Sabre/PublicDavLocksPlugin.php 59.25% <0.00%> (-13.47%) 10.00% <0.00%> (+1.00%) ⬇️
apps/files/lib/App.php 20.00% <0.00%> (-5.00%) 3.00% <0.00%> (ø%)
core/js/files/client.js 79.94% <0.00%> (-3.49%) 0.00% <0.00%> (ø%)
...ederatedfilesharing/lib/FederatedShareProvider.php 63.36% <0.00%> (+0.52%) 94.00% <0.00%> (+3.00%)

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 e09aab4...3831752. Read the comment docs.

@codecov
Copy link

codecov bot commented Jun 18, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #37552   +/-   ##
=========================================
  Coverage     64.70%   64.70%           
  Complexity    19353    19353           
=========================================
  Files          1281     1281           
  Lines         75612    75612           
  Branches       1333     1333           
=========================================
  Hits          48925    48925           
  Misses        26295    26295           
  Partials        392      392           
Flag Coverage Δ Complexity Δ
#javascript 54.03% <ø> (ø) 0.00 <ø> (ø)
#phpunit 65.88% <ø> (ø) 19353.00 <ø> (ø)

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 f4ad0c7...9d143b4. Read the comment docs.

@PVince81 PVince81 force-pushed the tests-adjust-public-share-test-issues branch from 3831752 to dbfa573 Compare June 18, 2020 14:35
@PVince81
Copy link
Contributor Author

Squashed and pushed. Added some more tickets and excluded tests.

Still, I managed to enable a bunch of tests for public link upload, download, creation, etc. Updating and deleting is not implemented yet.

@PVince81
Copy link
Contributor Author

While splitting the "old public webdav" and "new public webdav" I came accross a test tagged with @issue-36055.
That test had the test steps commented out for the "new public webdav".

It turns out that this bit still doesn't work. I've now marked it as @skipOnOcV10 and reopened the ticket, see #36055 (comment)

@individual-it FYI

@PVince81 PVince81 marked this pull request as ready for review June 24, 2020 15:37
@PVince81
Copy link
Contributor Author

I ran the unskipped tests marked with issue 49 against the matching Reva PR that solves those: cs3org/reva#877

TEST_SERVER_URL=http://localhost:9140 \
TEST_EXTERNAL_USER_BACKENDS=true \
TEST_OCIS=true \
OCIS_REVA_DATA_ROOT=/var/tmp/reva/ \
SKELETON_DIR=$HOME/work/workspace/owncloud/apps-external/testing/data/apiSkeleton \
BEHAT_FILTER_TAGS='~@skipOnOcV10&&~@skipOnLDAP&&@TestAlsoOnExternalUserBackend&&~@local_storage&&@issue-ocis-reva-49&&~@skipOnOcis'

and they all pass:

21 scenarios (21 passed)
145 steps (145 passed)

please note that some are still skipped due to other issues, see OP for a listing of related issues to address separately.

@PVince81
Copy link
Contributor Author

we might want to wait for the Reva PRs to be merged and updated in ocis-reva just to be on the safe side

@PVince81 PVince81 changed the title [Tests-only] Adjust public link tests [Tests-only] Adjust public link tests for download, upload and other operations Jun 24, 2020
| uid_file_owner | Alice |
| uid_owner | Alice |
| name | |
When the public downloads the last public shared file with range "bytes=0-9" using the old public WebDAV API
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
When the public downloads the last public shared file with range "bytes=0-9" using the old public WebDAV API
When the public downloads the last public shared file with range "bytes=0-9" using the new public WebDAV API

| uid_file_owner | Alice |
| uid_owner | Alice |
| name | |
When the public downloads the last public shared file with range "bytes=0-9" using the old public WebDAV API
Then the downloaded content should be "Random dat"
And the public upload to the last publicly shared file using the old public WebDAV API should fail with HTTP status code "403"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
And the public upload to the last publicly shared file using the old public WebDAV API should fail with HTTP status code "403"
And the public upload to the last publicly shared file using the new public WebDAV API should fail with HTTP status code "403"

Then the downloaded content should be "Random dat"
And the public upload to the last publicly shared file using the old public WebDAV API should fail with HTTP status code "403"
And the public upload to the last publicly shared file using the new public WebDAV API should fail with HTTP status code "403"
Then the downloaded content should be "Random dat"
Copy link
Member

Choose a reason for hiding this comment

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

remove this line, that check is done above and fail here because there is no download before this step

@PVince81 PVince81 force-pushed the tests-adjust-public-share-test-issues branch from f6ca8a3 to 421959d Compare June 25, 2020 09:59
@PVince81
Copy link
Contributor Author

@individual-it thanks for spotting. I already rechecked those bits over and over again for discrepancies but still managed to miss it. I've fixed that location and squashed.

Enabled some tests and tagged others that are not working yet.

In some feature files, the "old" and "new" public webdav API tests were
split into separate scenarios, as OCIS doesn't support the old public
webdav API.
@PVince81 PVince81 force-pushed the tests-adjust-public-share-test-issues branch from 421959d to 9d143b4 Compare June 25, 2020 10:02
@PVince81
Copy link
Contributor Author

API tests passed in https://cloud.drone.io/owncloud/ocis-reva/521, merging

@PVince81 PVince81 merged commit ad274cb into master Jun 26, 2020
@PVince81 PVince81 deleted the tests-adjust-public-share-test-issues branch June 26, 2020 09:59
@PVince81 PVince81 mentioned this pull request Jun 29, 2020
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants