summaryrefslogtreecommitdiffstats
path: root/src/tests/t_kadm5_hook.py
blob: 1f023ea0f266160c1800450bc016c86e8ec6612c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/python
from k5test import *

plugin = os.path.join(buildtop, "plugins", "kadm5_hook", "test",
                      "kadm5_hook_test.so")

hook_krb5_conf = {'plugins': {'kadm5_hook': { 'module': 'test:' + plugin}}}

realm = K5Realm(krb5_conf=hook_krb5_conf, create_user=False, create_host=False)
output = realm.run_kadminl ('addprinc -randkey test')
if "create: stage precommit" not in output:
    fail('kadm5_hook test output not found')

success('kadm5_hook')