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

Keep track of which groups are possibleToDelete #31002

Merged
merged 1 commit into from
Apr 4, 2018

Conversation

phil-davis
Copy link
Contributor

Description

  1. Add an attribute of a group possibleToDelete which is false for LDAP groups. Use that attribute to decide what sort of group existence... checks we should really enforce.

  2. LDAP users actually can be deleted on the local ownCloud, so remove the $shouldExist = false setting from those. We are happy for AfterScenario code to get rid of those users (which it is doing now) and to give warnings if it cannot.

This should help acceptance tests in user_ldap

Related Issue

Motivation and Context

When running user_ldap tests, the AfterScenario that cleans up groups complains because it cannot delete the LDAP groups. That is because there is a:

PHPUnit_Framework_Assert::assertFalse($this->groupExists($group));

that double-checks that the group really is gone, after attempting to delete it.

For LDAP, actually the group(s) cannot be deleted. so that double-check is not relevant in that case. For LDAP groups we are forced to just keep going between scenarios without explicitly deleting all the groups and creating them again.

How Has This Been Tested?

CI knows

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 refining

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 Apr 4, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #31002   +/-   ##
=========================================
  Coverage      62.3%    62.3%           
  Complexity    18208    18208           
=========================================
  Files          1142     1142           
  Lines         68221    68221           
  Branches       1234     1234           
=========================================
  Hits          42505    42505           
  Misses        25355    25355           
  Partials        361      361
Flag Coverage Δ Complexity Δ
#javascript 51.97% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 63.48% <ø> (ø) 18208 <ø> (ø) ⬇️

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 01ad9dd...89d0820. Read the comment docs.

@phil-davis phil-davis merged commit b7ef5ac into master Apr 4, 2018
@phil-davis phil-davis deleted the fix-ldap-acceptance-test-users-groups-cleanup branch April 4, 2018 15:01
@phil-davis
Copy link
Contributor Author

Backport stable10 #31007

@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.

2 participants