aboutsummaryrefslogtreecommitdiff
path: root/src/tests/t_kadm5_hook.py
blob: 0c8b19dac043c6f1fd044d080e97281c266335ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/python
from k5test import *

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

hook_krb5_conf = {
    'all' : {
        "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')