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] Do not try to revert LDAP settings of a deleted config #40799

Merged
merged 1 commit into from
May 19, 2023

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented May 19, 2023

Description

Some LDAP test scenarios use multiple LDAP server configs to test environments that have multiple LDAP server connections etc. The after-scenario methods delete these extra LDAP configs.

The test code also remembers what settings were changed in LDAP configs and tries to revert them.

But if an LDAP config is deleted in the after-scenario then there is no point trying to revert the settings of that LDAP config. Each attempt to revert a setting will get an error from the occ ldap:set-config command - "Invalid configID"

user_ldap PR owncloud/user_ldap#787 has fixed the ldap:set-config command so that it now exits with an error status in that case. And so the CI of that PR is failing.

This core PR fixes the test code so that it will not call ldap:set-config for configs that have been deleted.

How Has This Been Tested?

CI

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

@phil-davis phil-davis merged commit f2b2a39 into master May 19, 2023
@delete-merged-branch delete-merged-branch bot deleted the fix-ldap-after-scenario branch May 19, 2023 10:05
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.

2 participants