[tests-only] Do not try to revert LDAP settings of a deleted config #40799
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Checklist: