#!/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" USER_DN="uid=lastbind-user,${TEST_SUFFIX}" eventually has_entry "${URI}" "${TEST_SUFFIX}" expect_rc 0 bind_search "${URI}" "${CONFIG_ADMIN_DN}" \ -b 'olcDatabase={1}mdb,cn=config' -s base olcLastBind olcLastBindPrecision if [ "${TEST_LAST_BIND_MODE}" = "default" ]; then expect_output '^olcLastBind: FALSE$' else expect_output '^olcLastBind: TRUE$' fi if [ "${TEST_LAST_BIND_MODE}" = "precise" ]; then expect_output '^olcLastBindPrecision: 0$' else expect_output '^olcLastBindPrecision: 3600$' fi expect_rc 0 bind_modify "${URI}" "${ADMIN_DN}" -a <