$(RUNPYTEST) $(srcdir)/t_keyrollover.py $(PYTESTFLAGS)
$(RUNPYTEST) $(srcdir)/t_renew.py $(PYTESTFLAGS)
$(RUNPYTEST) $(srcdir)/t_renprinc.py $(PYTESTFLAGS)
- $(RUNPYTEST) $(srcdir)/t_cccol.py $(PYTESTFLAGS)
+ $(RUNPYTEST) $(srcdir)/t_ccache.py $(PYTESTFLAGS)
$(RUNPYTEST) $(srcdir)/t_stringattr.py $(PYTESTFLAGS)
$(RUNPYTEST) $(srcdir)/t_sesskeynego.py $(PYTESTFLAGS)
$(RUNPYTEST) $(srcdir)/t_crossrealm.py $(PYTESTFLAGS)
#!/usr/bin/python
from k5test import *
-realm = K5Realm(create_user=False, create_host=False)
+realm = K5Realm(create_host=False)
-# Make a directory collection and use it for client commands in both realms.
-ccdir = os.path.join(realm.testdir, 'cc')
-ccname = 'DIR:' + ccdir
+# Test kdestroy and klist of a non-existent ccache.
+realm.run_as_client([kdestroy])
+output = realm.run_as_client([klist], expected_code=1)
+if 'No credentials cache found' not in output:
+ fail('Expected error message not seen in klist output')
+
+# Make a directory collection and use it for client commands.
+ccname = 'DIR:' + os.path.join(realm.testdir, 'cc')
realm.env_client['KRB5CCNAME'] = ccname
realm.addprinc('alice', password('alice'))
if not output.endswith('---\n') or output.count('\n') != 2:
fail('kdestroy -a failed to empty cache collection.')
-success('Credential cache collection tests')
+success('Credential cache tests')
if 'fred\n' not in output:
fail('Policy not preserved across dump/load.')
-# Test kdestroy and klist of a non-existent ccache.
-realm.run_as_client([kdestroy])
-output = realm.run_as_client([klist], expected_code=1)
-if 'No credentials cache found' not in output:
- fail('Expected error message not seen in klist output')
-
# Spot-check KRB5_TRACE output
tracefile = os.path.join(realm.testdir, 'trace')
realm.run_as_client(['env', 'KRB5_TRACE=' + tracefile, kinit,