From: Greg Hudson Date: Tue, 24 Jul 2012 20:26:28 +0000 (-0400) Subject: Rename tests/t_cccol.py to t_ccache.py X-Git-Tag: krb5-1.11-alpha1~383 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18884ca01e1a64fcefafc0fdad0d360651c81f13;p=thirdparty%2Fkrb5.git 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. --- 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 similarity index 88% rename from src/tests/t_cccol.py rename to 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,