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-share-disableGroupShare #31709

Merged
merged 1 commit into from
Jun 13, 2018

Conversation

paurakhsharma
Copy link
Member

Description

This PR adds test to check the behavior of sharing API when group sharing is disabled

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.

@codecov
Copy link

codecov bot commented Jun 11, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #31709   +/-   ##
=========================================
  Coverage     63.15%   63.15%           
  Complexity    18442    18442           
=========================================
  Files          1158     1158           
  Lines         69279    69279           
  Branches       1260     1260           
=========================================
  Hits          43755    43755           
  Misses        25155    25155           
  Partials        369      369
Flag Coverage Δ Complexity Δ
#javascript 52.39% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 64.39% <ø> (ø) 18442 <ø> (ø) ⬇️

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 ae6fbf6...004a998. Read the comment docs.

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.

New scenarios look fine. See other comments.

@@ -864,7 +864,7 @@ public function userSharesFileWithGroupUsingTheAPI(
}

/**
* @Then /^user "([^"]*)" should not be able to share (?:file|folder|entry) "([^"]*)" with (?:user|group) "([^"]*)"(?: with permissions ([\d]*))? using the API$/
* @Then /^user "([^"]*)" should not be able to share (?:file|folder|entry) "([^"]*)" with user "([^"]*)"(?: with permissions ([\d]*))? 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.

It seems a pity to repeat most of this code. You could just remove ?: from (?:user|group) to be (user|group) and then you will add that as a parameter. Then you can easily decide if user, pass 0 to createShare otherwise pass 1.

@@ -12,7 +12,6 @@ So that ownCloud users cannot share file or folder
Given as user "admin"
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a few more of these "random" as user "admin" lines in here. I suspect none of them are needed.

@paurakhsharma paurakhsharma force-pushed the API-test-sharing-groupSharingDisabled branch from edca093 to 0286634 Compare June 12, 2018 09:47
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.

Now you need to resolve the conflicts here - the other PR had changes in similar places.

@paurakhsharma paurakhsharma force-pushed the API-test-sharing-groupSharingDisabled branch from 0286634 to 004a998 Compare June 12, 2018 11:02
@phil-davis phil-davis merged commit 5a97c8c into master Jun 13, 2018
@phil-davis phil-davis deleted the API-test-sharing-groupSharingDisabled branch June 13, 2018 08:13
@paurakhsharma
Copy link
Member Author

Backport on #31746

@lock
Copy link

lock bot commented Jul 31, 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 31, 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.

3 participants