URL: https://github.com/freeipa/freeipa/pull/2344
Author: tiran
 Title: #2344: [Backport][ipa-4-7] Add test for client installation with empty 
keytab file
Action: opened

PR body:
"""
This PR was opened automatically because PR #2333 was pushed to master and 
backport to ipa-4-7 is required.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/2344/head:pr2344
git checkout pr2344
From 8822b51d43e5befd8265ffe5e0708c302970e0bb Mon Sep 17 00:00:00 2001
From: Armando Neto <abiag...@redhat.com>
Date: Wed, 5 Sep 2018 16:22:39 -0300
Subject: [PATCH] Add test for client installation with empty keytab file

Missing test case for cf1301fb064fc230c780c4bc5eeccb723899f7b6.

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

Signed-off-by: Armando Neto <abiag...@redhat.com>
---
 .../test_forced_client_reenrollment.py              | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/ipatests/test_integration/test_forced_client_reenrollment.py b/ipatests/test_integration/test_forced_client_reenrollment.py
index bcc6c1f934..8822316a17 100644
--- a/ipatests/test_integration/test_forced_client_reenrollment.py
+++ b/ipatests/test_integration/test_forced_client_reenrollment.py
@@ -160,6 +160,19 @@ def test_try_to_reenroll_with_incorrect_keytab(self, client):
         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'],
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to