#!/bin/bash set -euo pipefail # if container log level is trace: # print commands and their arguments as they are executed container log level eq trace && set -x # shellcheck disable=SC1091 source /tmp/openldap-test-lib.sh URI="ldap://${TEST_NODES}:3890" POLICY_DN="cn=default,ou=policies,${TEST_SUFFIX}" USER_DN="uid=delay-user,${TEST_SUFFIX}" OTHER_DN="uid=other-user,${TEST_SUFFIX}" eventually has_entry "${URI}" "${POLICY_DN}" expect_rc 0 bind_search "${URI}" "${ADMIN_DN}" -b "${POLICY_DN}" -s base pwdMinDelay pwdMaxDelay if [ "${TEST_PPOLICY_DELAY_MODE}" = default ]; then expect_output '^pwdMinDelay: 0$' expect_output '^pwdMaxDelay: 0$' else expect_output '^pwdMinDelay: 2$' expect_output '^pwdMaxDelay: 4$' fi for user in delay-user other-user; do expect_rc 0 bind_modify "${URI}" "${ADMIN_DN}" -a <