Blame src/tests/t_unlockiter.py

Packit fd8b60
from k5test import *
Packit fd8b60
Packit fd8b60
# Default KDB iteration is locked.  Expect write lock failure unless
Packit fd8b60
# unlocked iteration is explicitly requested.
Packit fd8b60
realm = K5Realm(create_user=False, create_host=False, start_kdc=False,
Packit fd8b60
                bdb_only=True)
Packit fd8b60
realm.run(['./unlockiter'], expected_code=1)
Packit fd8b60
realm.run(['./unlockiter', '-u'])
Packit fd8b60
realm.run(['./unlockiter', '-l'], expected_code=1)
Packit fd8b60
Packit fd8b60
# Set default to unlocked iteration.  Only explicitly requested locked
Packit fd8b60
# iteration should block the write lock.
Packit fd8b60
realm = K5Realm(create_user=False, create_host=False, start_kdc=False,
Packit fd8b60
                bdb_only=True,
Packit fd8b60
                krb5_conf={'dbmodules': {'db': {'unlockiter': 'true'}}})
Packit fd8b60
realm.run(['./unlockiter'])
Packit fd8b60
realm.run(['./unlockiter', '-u'])
Packit fd8b60
realm.run(['./unlockiter', '-l'], expected_code=1)
Packit fd8b60
Packit fd8b60
success('Unlocked iteration unit tests')