summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-07-24 16:26:28 -0400
committerGreg Hudson <ghudson@mit.edu>2012-07-24 16:26:28 -0400
commit18884ca01e1a64fcefafc0fdad0d360651c81f13 (patch)
treeb5f3d2504c8cc413fd3e64da3041a489df653abd
parent8fbbfd7e2d2cd19f708b1944b75c60595fc65ec2 (diff)
downloadkrb5-18884ca01e1a64fcefafc0fdad0d360651c81f13.tar.gz
krb5-18884ca01e1a64fcefafc0fdad0d360651c81f13.tar.xz
krb5-18884ca01e1a64fcefafc0fdad0d360651c81f13.zip
Rename tests/t_cccol.py to t_ccache.py
Generalize the ccache collection tests in t_cccol.py to multiple kinds of ccache tests, and rename it to avoid confusion with the lower-level lib/krb5/ccache/t_cccol.py. Move a test from t_general.py into t_ccache.py.
-rw-r--r--src/tests/Makefile.in2
-rw-r--r--src/tests/t_ccache.py (renamed from src/tests/t_cccol.py)15
-rwxr-xr-xsrc/tests/t_general.py6
3 files changed, 11 insertions, 12 deletions
diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in
index 375a60d3dc..210bd8d7c2 100644
--- a/src/tests/Makefile.in
+++ b/src/tests/Makefile.in
@@ -71,7 +71,7 @@ check-pytests:: hist
$(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)
diff --git a/src/tests/t_cccol.py b/src/tests/t_ccache.py
index 35b39d265c..8dac0ecad2 100644
--- a/src/tests/t_cccol.py
+++ b/src/tests/t_ccache.py
@@ -23,11 +23,16 @@
#!/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'))
@@ -73,4 +78,4 @@ output = realm.run_as_client([klist, '-l'], expected_code=1)
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')
diff --git a/src/tests/t_general.py b/src/tests/t_general.py
index cbad32d4ca..2b04b8eae4 100755
--- a/src/tests/t_general.py
+++ b/src/tests/t_general.py
@@ -33,12 +33,6 @@ output = realm.run_kadminl('getpols')
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,