krb5 commit: Rename tests/t_cccol.py to t_ccache.py

Greg Hudson ghudson at MIT.EDU
Tue Jul 24 16:36:36 EDT 2012


https://github.com/krb5/krb5/commit/18884ca01e1a64fcefafc0fdad0d360651c81f13
commit 18884ca01e1a64fcefafc0fdad0d360651c81f13
Author: Greg Hudson <ghudson at mit.edu>
Date:   Tue Jul 24 16:26:28 2012 -0400

    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.

 src/tests/Makefile.in  |    2 +-
 src/tests/t_ccache.py  |   81 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/tests/t_cccol.py   |   76 ---------------------------------------------
 src/tests/t_general.py |    6 ---
 4 files changed, 82 insertions(+), 83 deletions(-)

diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in
index 375a60d..210bd8d 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
similarity index 88%
rename from src/tests/t_cccol.py
rename to src/tests/t_ccache.py
index 35b39d2..8dac0ec 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 cbad32d..2b04b8e 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,


More information about the cvs-krb5 mailing list