[freeipa PR#3742][opened] iptests: fix test_replica_promotion.py::TestHiddenReplicaPromotion
by flo-renaud
URL: https://github.com/freeipa/freeipa/pull/3742
Author: flo-renaud
Title: #3742: iptests: fix test_replica_promotion.py::TestHiddenReplicaPromotion
Action: opened
PR body:
"""
The test test_replica_promotion.py::TestHiddenReplicaPromotion randomly fails in nightly_f29.
The test is checking that a given IP address is not in the DNS records for the domain. When we are unlucky, we may come up with the following situation:
- IP address that is unexpected: 192.168.121.25
- IP address that is found for the DNS record: 192.168.121.254
As 192.168.121.25 is a substring of 192.168.121.254, the test wrongly considers that the unexpected address was found.
Extract of the log:
```
for host in hosts_unexpected:
value = host.hostname if rtype == 'SRV' else host.ip
> assert value not in txt
E AssertionError: assert '192.168.121.25' not in 'ipa-ca.ipa.test. 1 IN A 192.168.121.254'
E '192.168.121.25' is contained here:
E ipa-ca.ipa.test. 1 IN A 192.168.121.254
E ? ++++++++++++++
```
This happens because the test is comparing the content of the output as a string. The fix is extracting the exact hostname/IP address from the record instead.
Fixes: https://pagure.io/freeipa/issue/8070
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/3742/head:pr3742
git checkout pr3742
4 years, 6 months
[freeipa PR#3739][opened] ipa user_add: do not check group if UPG is disabled
by flo-renaud
URL: https://github.com/freeipa/freeipa/pull/3739
Author: flo-renaud
Title: #3739: ipa user_add: do not check group if UPG is disabled
Action: opened
PR body:
"""
### ipa user_add: do not check group if UPG is disabled
The UPG plugin is used to create a user private group when a new IPA user is created, with the same name as the user. When this plugin is enabled, the user creation must ensure that no group exists with the same name.
When the UPG plugin is disabled, or when the user is created with the --noprivate option, there is no need to perform this check as the private group will not get created.
Currently, the --noprivate option correctly skips the test, but a disabled UPG plugin does not skip the test. The fix ensures that UPG plugin status is checked.
Fixes: https://pagure.io/freeipa/issue/4972
### ipatests: add XMLRPC test for user-add when UPG plugin is disabled
Add a new XMLRPC test in test_user_plugin:
- disable the UPG plugin
- create a user without the --gid parameter
as the default group for new users is not POSIX (ipausers), the command is expected to fail
- create a user with the --gid parameter
The provided gid is used and command is expected to succeed
- create a user with the same name as an existing group
As the UPG plugin is disabled, the user creation will not trigger the creation of a group with the same name, and command is expected to succeed
- re-enable the UPG plugin for other tests
Related to: https://pagure.io/freeipa/issue/4972
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/3739/head:pr3739
git checkout pr3739
4 years, 6 months