mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
ipatests: Test to check ipa-healthcheck tool displays warning when run on ipa-client
The testcase checks that when ipa-healthcheck tool is run on ipa-client it will display warning message "IPA is not configured" Signed-off-by: Sudhir Menon <sumenon@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
d832736f5a
commit
e86ff48b49
@ -234,12 +234,14 @@ class TestIpaHealthCheck(IntegrationTest):
|
||||
"""
|
||||
|
||||
num_replicas = 1
|
||||
num_clients = 1
|
||||
|
||||
@classmethod
|
||||
def install(cls, mh):
|
||||
if not cls.master.transport.file_exists(SOS_CMD):
|
||||
tasks.install_packages(cls.master, SOS_PKG)
|
||||
tasks.install_master(cls.master, setup_dns=True)
|
||||
tasks.install_client(cls.master, cls.clients[0])
|
||||
tasks.install_replica(cls.master, cls.replicas[0], setup_dns=True)
|
||||
|
||||
def test_ipa_healthcheck_install_on_master(self):
|
||||
@ -256,6 +258,21 @@ class TestIpaHealthCheck(IntegrationTest):
|
||||
"""
|
||||
tasks.install_packages(self.replicas[0], HEALTHCHECK_PKG)
|
||||
|
||||
def test_running_ipahealthcheck_ipaclient(self):
|
||||
"""
|
||||
Testcase checks that when ipa-healthcheck command is
|
||||
run on ipaclient it displays "IPA is not configured"
|
||||
"""
|
||||
valid_msg = (
|
||||
'IPA is not configured\n', 'IPA server is not configured\n'
|
||||
)
|
||||
tasks.install_packages(self.clients[0], HEALTHCHECK_PKG)
|
||||
cmd = self.clients[0].run_command(
|
||||
["ipa-healthcheck"], raiseonerr=False
|
||||
)
|
||||
assert cmd.returncode == 1
|
||||
assert cmd.stdout_text in valid_msg
|
||||
|
||||
def test_run_ipahealthcheck_list_source(self):
|
||||
"""
|
||||
Testcase to verify sources available in healthcheck tool.
|
||||
|
Loading…
Reference in New Issue
Block a user