]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Rename tests/t_cccol.py to t_ccache.py
authorGreg Hudson <ghudson@mit.edu>
Tue, 24 Jul 2012 20:26:28 +0000 (16:26 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 24 Jul 2012 20:26:28 +0000 (16:26 -0400)
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
src/tests/t_ccache.py [moved from src/tests/t_cccol.py with 88% similarity]
src/tests/t_general.py

index 375a60d3dcaf3bd60b06eee013fcf713d96c3067..210bd8d7c25e459892f821dad5ebb8524fe58832 100644 (file)
@@ -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)
similarity index 88%
rename from src/tests/t_cccol.py
rename to src/tests/t_ccache.py
index 35b39d265c5d3acdcf5ce1d95bc3d9943926e5e0..8dac0ecad23beec0c9e4b79aa2baada3a7078f21 100644 (file)
 #!/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')
index cbad32d4cae5906164e0a44feb7904aab07196b4..2b04b8eae4c8d3e2174797a7277a2cbe136cff00 100755 (executable)
@@ -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,