URL: https://github.com/freeipa/freeipa/pull/5402
Author: wladich
 Title: #5402: [Backport][ipa-4-8] ipatests: do not set dns_lookup to true
Action: opened

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

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/5402/head:pr5402
git checkout pr5402
From 476e14570b5544506beacd0f76965f5a1c9b5585 Mon Sep 17 00:00:00 2001
From: Sergey Orlov <sor...@redhat.com>
Date: Wed, 6 Jan 2021 14:31:35 +0100
Subject: [PATCH] ipatests: do not set dns_lookup to true

dns_lookup was set to false during ipa client installation which prevented
searches for SRV records for Kerberos servers.
Since https://pagure.io/freeipa/issue/6523 is fixed, dns_lookup is always True
now and the fixture is not needed anymore.
---
 ipatests/test_integration/test_smb.py | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/ipatests/test_integration/test_smb.py b/ipatests/test_integration/test_smb.py
index 3cc3fb71c72..37725ab1549 100644
--- a/ipatests/test_integration/test_smb.py
+++ b/ipatests/test_integration/test_smb.py
@@ -78,23 +78,6 @@ def install(cls, mh):
         for user in [cls.ipa_user1, cls.ipa_user2, cls.ad_user]:
             tasks.run_command_as_user(cls.smbserver, user, ['stat', '.'])
 
-    def enable_dns_lookup_kdc(self, host):
-        with tasks.FileBackup(host, paths.KRB5_CONF):
-            krb5_conf = host.get_file_contents(
-                paths.KRB5_CONF, encoding='utf-8')
-            krb5_conf = krb5_conf.replace(
-                'dns_lookup_kdc = false', 'dns_lookup_kdc = true')
-            host.put_file_contents(paths.KRB5_CONF, krb5_conf)
-            yield
-
-    @pytest.fixture
-    def enable_smb_client_dns_lookup_kdc(self):
-        yield from self.enable_dns_lookup_kdc(self.smbclient)
-
-    @pytest.fixture
-    def enable_smb_server_dns_lookup_kdc(self):
-        yield from self.enable_dns_lookup_kdc(self.smbserver)
-
     @pytest.fixture
     def samba_share_public(self):
         """Setup share outside /home on samba server."""
@@ -320,8 +303,7 @@ def test_smb_access_for_ipa_user_at_ipa_client(self):
         self.check_smb_access_at_ipa_client(
             self.ipa_user1, self.ipa_user1_password, samba_share)
 
-    def test_smb_access_for_ad_user_at_ipa_client(
-            self, enable_smb_client_dns_lookup_kdc):
+    def test_smb_access_for_ad_user_at_ipa_client(self):
         samba_share = {
             'name': 'homes',
             'server_path': '/home/{}/{}'.format(self.ad.domain.name,
@@ -352,7 +334,7 @@ def test_smb_mount_and_access_by_different_users(self, samba_share_public):
     @pytest.mark.skipif(
         osinfo.id == 'fedora' and osinfo.version_number <= (31,),
         reason='Test requires krb 1.18')
-    def test_smb_service_s4u2self(self, enable_smb_server_dns_lookup_kdc):
+    def test_smb_service_s4u2self(self):
         """Test S4U2Self operation by IPA service
            against both AD and IPA users
         """
_______________________________________________
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://docs.fedoraproject.org/en-US/project/code-of-conduct/
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