diff options
author | Greg Hudson <ghudson@mit.edu> | 2011-07-20 05:12:10 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2011-07-20 05:12:10 +0000 |
commit | c70991d2de28f5f19ab0a9c1262d25c89c359725 (patch) | |
tree | 3edd3dcba8df502ea4f5d190e93ecc78007373da /src/tests/gssapi/t_gssapi.py | |
parent | f9bcb7139345ecfafc2dd2f4317f34c5aac381fa (diff) | |
download | krb5-c70991d2de28f5f19ab0a9c1262d25c89c359725.tar.gz krb5-c70991d2de28f5f19ab0a9c1262d25c89c359725.tar.xz krb5-c70991d2de28f5f19ab0a9c1262d25c89c359725.zip |
Add automated tests for krb5_gss_import_cred
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25022 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests/gssapi/t_gssapi.py')
-rw-r--r-- | src/tests/gssapi/t_gssapi.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/tests/gssapi/t_gssapi.py b/src/tests/gssapi/t_gssapi.py index f4dd9e3cb8..32485d03b7 100644 --- a/src/tests/gssapi/t_gssapi.py +++ b/src/tests/gssapi/t_gssapi.py @@ -69,10 +69,19 @@ output = realm.run_as_client(['./t_accname', 'host/-nomatch-', if 'Wrong principal in request' not in output: fail('Expected error message not seen in t_accname output') +# Test krb5_gss_import_cred. +realm.run_as_client(['./t_imp_cred', 'service1/barack']) +realm.run_as_client(['./t_imp_cred', 'service1/barack', 'service1/barack']) +realm.run_as_client(['./t_imp_cred', 'service1/andrew', 'service1/abraham']) +output = realm.run_as_client(['./t_imp_cred', 'service2/dwight'], + expected_code=1) +if 'Wrong principal in request' not in output: + fail('Expected error message not seen in t_imp_cred output') + realm.stop() -# Re-run that last test with ignore_acceptor_hostname set and the -# principal for the mismatching hostname in the keytab. +# Re-run the last acceptor name test with ignore_acceptor_hostname set +# and the principal for the mismatching hostname in the keytab. ignore_conf = { 'all' : { 'libdefaults' : { 'ignore_acceptor_hostname' : 'true' } } } realm = K5Realm(krb5_conf=ignore_conf, start_kadmind=False) @@ -81,6 +90,6 @@ realm.run_kadminl('xst host/-nomatch-') output = realm.run_as_client(['./t_accname', 'host/-nomatch-', 'host@%s' % socket.gethostname()]) if 'host/-nomatch-' not in output: - fail('Expected error message not seen in t_accname output') + fail('Expected host/-nomatch- in t_accname output') success('GSSAPI tests.') |