def test_ipahealthcheck_hidden_replica(self): """Ensure that ipa-healthcheck runs successfully on all members of an IPA cluster that includes a hidden replica. """ os_version = (tasks.get_platform(self.master), tasks.get_platform_version(self.master)) pki_version = tasks.get_pki_version(self.master) # verify state self._check_config([self.master], [self.replicas[0]]) # A DNA range is needed on the replica for ipa-healthcheck to work. # Create a user so that the replica gets a range. tasks.user_add(self.replicas[0], 'testuser') tasks.user_del(self.replicas[0], 'testuser') for srv in (self.master, self.replicas[0]): returncode, _unused = run_healthcheck(srv, failures_only=True) pki_too_old = \ (os_version[0] == 'fedora' and pki_version < tasks.parse_version('11.1.0'))\ or (os_version[0] == 'rhel' and os_version[1][0] == 8 and pki_version < tasks.parse_version('10.12.0'))\ or (os_version[0] == 'rhel' and os_version[1][0] == 9 and pki_version < tasks.parse_version('11.0.4')) with xfail_context(pki_too_old, 'https://pagure.io/freeipa/issue/8582'): assert returncode == 0
def test_ipahealthcheck_hidden_replica(self): """Ensure that ipa-healthcheck runs successfully on all members of an IPA cluster that includes a hidden replica. """ # verify state self._check_config([self.master], [self.replicas[0]]) # A DNA range is needed on the replica for ipa-healthcheck to work. # Create a user so that the replica gets a range. tasks.user_add(self.replicas[0], 'testuser') tasks.user_del(self.replicas[0], 'testuser') for srv in (self.master, self.replicas[0]): returncode, _unused = run_healthcheck(srv, failures_only=True) assert returncode == 0