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] Make deleteLdapUsersAndGroups backward-compatible for oC10 user_ldap testing #39910

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Mar 23, 2022

Description

The new code in #39893 tries to delete each user and group one-by-one from the LDAP server. It was not done that way previously - we used to just delete the whole user and group "ou".

Put "if" checks around the new code so that we do not do it when testing oC10. That gets the oC10 tests passing.
(We could investigate in more detail about exactly why deleting one-by-one does not work, but for now just put back the original behavior and get CI passing)

Related Issue

How Has This Been Tested?

user_ldap PR owncloud/user_ldap#731 passes.

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

$this->rememberThatGroupIsNotExpectedToExist($group);
}
if (!$this->skipImportLdif) {
if (!$isOcisOrReva || !$this->skipImportLdif) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: we want to always execute this "if" block when we are doing regular oC10 testing (i.e. when not testing oCIS or reva) because in oC10 testing we delete the whole user and group ous and create them again for each test scenario.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@phil-davis phil-davis merged commit 8fc353d into master Mar 23, 2022
@delete-merged-branch delete-merged-branch bot deleted the adjust-ldap-test-code branch March 23, 2022 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Acceptance tests failing
2 participants