Skip to content

[Tests-Only] Refactor federation sharing tests for shares folder - #37967

Merged
phil-davis merged 1 commit into
masterfrom
refactor-fed-tests-for-shares
Oct 5, 2020
Merged

phil-davis merged 1 commit into
masterfrom
refactor-fed-tests-for-shares

Conversation

@dpakach

@dpakach dpakach commented Oct 2, 2020 •

Copy link
Copy Markdown
Contributor

Description

Refactor apiFederation tests for include default share folder.

Related Issue

Motivation and Context

How Has This Been Tested?

🤖

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@dpakach
dpakach force-pushed the refactor-fed-tests-for-shares branch 4 times, most recently from de93ebd to eea8eda Compare October 2, 2020 11:07
@dpakach
dpakach marked this pull request as ready for review October 2, 2020 11:10
@dpakach dpakach self-assigned this Oct 2, 2020
@dpakach dpakach mentioned this pull request Oct 2, 2020
2 tasks
@phil-davis
phil-davis force-pushed the refactor-fed-tests-for-shares branch from eea8eda to fc0f6c8 Compare October 5, 2020 03:08
@phil-davis

Copy link
Copy Markdown
Contributor

Fixed the fail here: https://drone.owncloud.com/owncloud/core/27091/104/18 squashed and rebased.

@codecov

codecov Bot commented Oct 5, 2020 •

Copy link
Copy Markdown

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #37967   +/-   ##
=========================================
  Coverage     64.72%   64.72%           
  Complexity    19445    19445           
=========================================
  Files          1286     1286           
  Lines         76037    76037           
  Branches       1336     1336           
=========================================
  Hits          49213    49213           
  Misses        26430    26430           
  Partials        394      394           
Flag Coverage Δ Complexity Δ
#javascript 54.06% <ø> (ø) 0.00 <ø> (ø)
#phpunit 65.89% <ø> (ø) 19445.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


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 d3144d6...fc0f6c8. Read the comment docs.

And using OCS API version "<ocs-api-version>"
When user "UNAUTHORIZED_USER" requests shared secret using the federation API
Then the HTTP status code should be "<http-status>"
Then the OCS status code should be "403"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Then the OCS status code should be "403"
And the OCS status code should be "403"

This was a "problem" in the original feature file. Probably needs to be fixed in 2 places now.
Make the change if we need to fix other stuff also.

And user "Carol" accepts share "/zzzfolder" offered by user "Brian" using the sharing API
And user "Brian" shares folder "randomfile.txt" with user "Carol" using the sharing API
And user "Carol" accepts share "/randomfile.txt" offered by user "Brian" using the sharing API
# local shares are taking priority at the moment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What does this mean?
In the steps below, /Shares/randomfile (2).txt is the one with the local content.

# Remove this line once the issue is resolved
When the administrator sets parameter "autoAddServers" of app "federation" to "0"
And user "Alice" from server "REMOTE" shares "/textfile1.txt" with user "Brian" from server "LOCAL" using the sharing API
And as "Brian" file "Shares/textfile1.txt" should not exist

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
And as "Brian" file "Shares/textfile1.txt" should not exist
Then as "Brian" file "Shares/textfile1.txt" should not exist

@phil-davis phil-davis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My previous review comments ended up being only trivial "usage of given-when-then-and" and a comment.
Those things were in the original code anyway, and can be adjusted in a cleanup.

@phil-davis
phil-davis merged commit d3a6524 into master Oct 5, 2020
@delete-merged-branch
delete-merged-branch Bot deleted the refactor-fed-tests-for-shares branch October 5, 2020 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants