diff options
author | Lenka Doudova <ldoudova@redhat.com> | 2016-09-13 10:11:30 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-09-21 18:48:22 +0200 |
commit | a7c49e455e4f1f06f621f4c634a79b3ae0585cd8 (patch) | |
tree | 3e73f264582d4d6fc9d17a7b09d4488f7eab6bf1 | |
parent | 8a947e2fd0d62df9a68252c1f7505451347b0c7d (diff) | |
download | freeipa-a7c49e455e4f1f06f621f4c634a79b3ae0585cd8.tar.gz freeipa-a7c49e455e4f1f06f621f4c634a79b3ae0585cd8.tar.xz freeipa-a7c49e455e4f1f06f621f4c634a79b3ae0585cd8.zip |
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 <mbasti@redhat.com>
-rw-r--r-- | ipatests/test_ipaserver/test_ldap.py | 6 |
1 files changed, 1 insertions, 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] |