From 3bba254ccdcf9b62fdd8a6d71baecf37c97c300c Mon Sep 17 00:00:00 2001 From: Florence Blanc-Renaud Date: Mon, 3 Apr 2023 08:37:28 +0200 Subject: [PATCH] ipatests: mark known failures for autoprivategroup Two tests have known issues in test_trust.py with sssd 2.8.2+: - TestNonPosixAutoPrivateGroup::test_idoverride_with_auto_private_group (when called with the "hybrid" parameter) - TestPosixAutoPrivateGroup::test_only_uid_number_auto_private_group_default (when called with the "true" parameter) Related: https://pagure.io/freeipa/issue/9295 Signed-off-by: Florence Blanc-Renaud Reviewed-By: Rob Crittenden Reviewed-By: Alexander Bokovoy --- ipatests/test_integration/test_trust.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py index 0d5b71cb0..12f000c1a 100644 --- a/ipatests/test_integration/test_trust.py +++ b/ipatests/test_integration/test_trust.py @@ -1154,11 +1154,15 @@ class TestNonPosixAutoPrivateGroup(BaseTestTrust): self.gid_override ): self.mod_idrange_auto_private_group(type) - (uid, gid) = self.get_user_id(self.clients[0], nonposixuser) - assert (uid == self.uid_override and gid == self.gid_override) + sssd_version = tasks.get_sssd_version(self.clients[0]) + bad_version = sssd_version >= tasks.parse_version("2.8.2") + cond = (type == 'hybrid') and bad_version + with xfail_context(condition=cond, + reason="https://pagure.io/freeipa/issue/9295"): + (uid, gid) = self.get_user_id(self.clients[0], nonposixuser) + assert (uid == self.uid_override and gid == self.gid_override) test_group = self.clients[0].run_command( ["id", nonposixuser]).stdout_text - # version = tasks.get_sssd_version(self.clients[0]) with xfail_context(type == "hybrid", 'https://github.com/SSSD/sssd/issues/5989'): assert "domain users@{0}".format(self.ad_domain) in test_group @@ -1232,8 +1236,11 @@ class TestPosixAutoPrivateGroup(BaseTestTrust): posixuser = "testuser1@%s" % self.ad_domain self.mod_idrange_auto_private_group(type) if type == "true": - (uid, gid) = self.get_user_id(self.clients[0], posixuser) - assert uid == gid + sssd_version = tasks.get_sssd_version(self.clients[0]) + with xfail_context(sssd_version >= tasks.parse_version("2.8.2"), + "https://pagure.io/freeipa/issue/9295"): + (uid, gid) = self.get_user_id(self.clients[0], posixuser) + assert uid == gid else: for host in [self.master, self.clients[0]]: result = host.run_command(['id', posixuser], raiseonerr=False)