From a7c49e455e4f1f06f621f4c634a79b3ae0585cd8 Mon Sep 17 00:00:00 2001 From: Lenka Doudova Date: Tue, 13 Sep 2016 10:11:30 +0200 Subject: Tests: Remove usage of krb5 ccache from test_ipaserver/test_ldap In test_ipaserver/test_ldap::test_ldap::test_GSSAPI a krb5 ccache is used to connect to ldap. The test tries to locate this cache in /tmp/krb5cc_$UID file, which is not there due to default settings in krb5.conf, and hence the whole test is skipped. Fix the test to use keyring to connect instead of ccache in /tmp. https://fedorahosted.org/freeipa/ticket/6323 Reviewed-By: Martin Basti --- ipatests/test_ipaserver/test_ldap.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ipatests/test_ipaserver/test_ldap.py b/ipatests/test_ipaserver/test_ldap.py index 9616913d1..904c8415c 100644 --- a/ipatests/test_ipaserver/test_ldap.py +++ b/ipatests/test_ipaserver/test_ldap.py @@ -37,7 +37,6 @@ import six from ipaserver.plugins.ldap2 import ldap2 from ipalib import api, x509, create_api, errors from ipapython import ipautil -from ipaplatform.paths import paths from ipapython.dn import DN if six.PY3: @@ -53,7 +52,6 @@ class test_ldap(object): def setup(self): self.conn = None self.ldapuri = 'ldap://%s' % ipautil.format_netloc(api.env.host) - self.ccache = paths.TMP_KRB5CC % os.getuid() nss.nss_init_nodb() self.dn = DN(('krbprincipalname','ldap/%s@%s' % (api.env.host, api.env.realm)), ('cn','services'),('cn','accounts'),api.env.basedn) @@ -77,10 +75,8 @@ class test_ldap(object): """ Test a GSSAPI LDAP bind using ldap2 """ - if not ipautil.file_exists(self.ccache): - raise nose.SkipTest('Missing ccache %s' % self.ccache) self.conn = ldap2(api, ldap_uri=self.ldapuri) - self.conn.connect(ccache='FILE:%s' % self.ccache) + self.conn.connect() entry_attrs = self.conn.get_entry(self.dn, ['usercertificate']) cert = entry_attrs.get('usercertificate') cert = cert[0] -- cgit