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

[Backport][ipa-4-7] ipatests: redesign sssd config editor #4326

Closed
wants to merge 4 commits into from

Conversation

wladich
Copy link

@wladich wladich commented Mar 9, 2020

This is a manual backport of #4313

There are three patterns for editing sssd.conf in tests now:
1. using modify_sssd_conf() which allows to modify only domain sections
2. using remote_ini_file
3. direct file editing using `sed`

This patch introduces new utility function which combines advantages of
first two approaches:
* changes are verified against schema, so that mistakes can be spotted
  early
* has convenient interface for simple options modification,
  both in domain and service sections
* allows sophisticated modifications through SSSDConfig object

Fixes: https://pagure.io/freeipa/issue/8219
Replace usage of remote_ini_file with remote_sssd_config.
The latter verifies changes against schema which helps to spot the mistakes.

Related to: https://pagure.io/freeipa/issue/8219
`use_fully_qualified_names` is not a valid parameter for `[sssd]` section
of sssd.conf, it can be specified only in domain section.
According to `man sssd.conf` it simply requires all requests to be fully
qualified, otherwise no result will be found. It is irrelevant to the
test scenario, so removing it.

Related to: https://pagure.io/freeipa/issue/8219
@abbra abbra added the ack Pull Request approved, can be merged label Mar 10, 2020
@abbra
Copy link
Contributor

abbra commented Mar 10, 2020

LGTM

@wladich
Copy link
Author

wladich commented Mar 10, 2020

ipa-4-7:

  • aa72208 ipatests: update docstring to reflect changes in FileBackup.restore()
  • 7a4d307 ipatests: replace utility for editing sssd.conf
  • 90d8863 ipatests: use remote_sssd_config to modify sssd.conf
  • c89dbf2 ipatests: remove invalid parameter from sssd.conf

@wladich wladich added the pushed Pull Request has already been pushed label Mar 10, 2020
@wladich wladich closed this Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
3 participants