summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-04-24 17:04:21 +0000
committerGreg Hudson <ghudson@mit.edu>2012-04-24 17:04:21 +0000
commitf4a07458225ff011af06492d36c62400b34ad506 (patch)
tree58d30d3f1f0dc61e6345aa3a66a0f7f3afa26b9d /src/tests
parent2782e80a12bccd920fa71e23166ac97c4470a637 (diff)
downloadkrb5-f4a07458225ff011af06492d36c62400b34ad506.tar.gz
krb5-f4a07458225ff011af06492d36c62400b34ad506.tar.xz
krb5-f4a07458225ff011af06492d36c62400b34ad506.zip
Adjust t_general.py organization
Move some tests out of the multipass_realms loop since they aren't enctype-dependent. Fix the success message not to mention kvno wrapping. Don't start kadmind in the multipass_realms loop since we don't use it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25820 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests')
-rwxr-xr-xsrc/tests/t_general.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/tests/t_general.py b/src/tests/t_general.py
index 73d2b080b1..ea823b8f55 100755
--- a/src/tests/t_general.py
+++ b/src/tests/t_general.py
@@ -1,16 +1,7 @@
#!/usr/bin/python
from k5test import *
-for realm in multipass_realms(create_host=False):
- # Create a policy and see if it survives a dump/load.
- realm.run_kadminl('addpol fred')
- dumpfile = os.path.join(realm.testdir, 'dump')
- realm.run_as_master([kdb5_util, 'dump', dumpfile])
- realm.run_as_master([kdb5_util, 'load', dumpfile])
- output = realm.run_kadminl('getpols')
- if 'fred\n' not in output:
- fail('Policy not preserved across dump/load.')
-
+for realm in multipass_realms(create_host=False, start_kadmind=False):
# Check that kinit fails appropriately with the wrong password.
output = realm.run_as_client([kinit, realm.user_princ], input='wrong\n',
expected_code=1)
@@ -29,14 +20,23 @@ for realm in multipass_realms(create_host=False):
realm.klist('user/fast@%s' % realm.realm)
# Test kinit against kdb keytab
- realm.run_as_master([kinit, "-k", "-t",
- "KDB:", realm.user_princ])
-
-
- # 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')
-
-success('Dump/load, FAST kinit, kdestroy, kvno wrapping')
+ realm.run_as_master([kinit, "-k", "-t", "KDB:", realm.user_princ])
+
+realm = K5Realm(create_host=False, start_kadmind=False)
+
+# Create a policy and see if it survives a dump/load.
+realm.run_kadminl('addpol fred')
+dumpfile = os.path.join(realm.testdir, 'dump')
+realm.run_as_master([kdb5_util, 'dump', dumpfile])
+realm.run_as_master([kdb5_util, 'load', dumpfile])
+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')
+
+success('Dump/load, FAST kinit, kdestroy')