On Fri, Sep 08 2017 at 06:34:24 +0200, mareynol@xxxxxxxxxx wrote: > =================================== FAILURES =================================== > ____________________________ test_default_behavior _____________________________ > > topology_st = <lib389.topologies.TopologyMain object at 0x7f3edffe5610> > global_policy_default = None, add_user = None > > def test_default_behavior(topology_st, global_policy_default, add_user): > """Test the default behavior of password > expiry warning time > > :ID: c47fa824-ee08-4b78-885f-bca4c42bb655 > :feature: Password Expiry Warning Time > :setup: Standalone DS instance with, > 1. Global password policy configured as follows, > passwordExp: on > passwordMaxAge: 86400 > passwordWarning: 86400 > passwordSendExpiringTime: off > 2. User entry for binding to the server > :steps: 1. Bind as the user > 2. Request the control for the user > :expectedresults: Password expiry warning time should be returned by the > server by the server since passwordMaxAge and > passwordWarning are set to the same value > """ > > res_ctrls = None > try: > log.info("Binding with {:s} and requesting the password expiry warning time" \ > .format(USER_DN)) > res_ctrls = get_password_warning(topology_st) > > log.info('\''Check that control is returned even'\'' > '\''if passwordSendExpiringTime is set to off'\'') >> assert res_ctrls > E assert [] > I broke this one by adjusting global_policy_defaults fixture to have the actual defaults that we have in the slap.h: ./ldap/servers/slapd/slap.h:#define SLAPD_DEFAULT_PW_MAXAGE 8640000 ./ldap/servers/slapd/slap.h:#define SLAPD_DEFAULT_PW_MAXAGE_STR "8640000" ./ldap/servers/slapd/slap.h:#define SLAPD_DEFAULT_PW_WARNING 86400 ./ldap/servers/slapd/slap.h:#define SLAPD_DEFAULT_PW_WARNING_STR "86400" So the original test was not testing the default behavior, but another case where PW_MAXAGE and PW_WARNING are the same. I'll send a fix today. -- Viktor
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ 389-devel mailing list -- 389-devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to 389-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx