Add test for client installation with empty keytab file

Missing test case for cf1301fb06.

https://pagure.io/freeipa/issue/7625

Signed-off-by: Armando Neto <abiagion@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Armando Neto 2018-09-05 16:22:39 -03:00 committed by Christian Heimes
parent 21f14e9893
commit c049992c6f

View File

@ -160,6 +160,19 @@ class TestForcedClientReenrollment(IntegrationTest):
self.clients[0].run_command(['touch', EMPTY_KEYTAB])
self.reenroll_client(keytab=EMPTY_KEYTAB, expect_fail=True)
def test_try_to_reenroll_with_empty_keytab(self, client):
"""
Client re-enrollment with invalid (empty) client keytab file
"""
self.restore_client()
self.check_client_host_entry()
try:
os.remove(CLIENT_KEYTAB)
except OSError:
pass
self.clients[0].run_command(['touch', CLIENT_KEYTAB])
self.reenroll_client(force_join=True)
def uninstall_client(self):
self.clients[0].run_command(
['ipa-client-install', '--uninstall', '-U'],