See 
<http://vm-058-081.abc.idm.lab.eng.brq.redhat.com:8080/job/389-DS-NIGHTLY/203/>

------------------------------------------
[...truncated 4468 lines...]
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd)
E           CalledProcessError: Command '\''['\''/usr/bin/systemctl'\'', 
'\''start'\'', '\''dirsrv@standalone_1'\'']'\'' returned non-zero exit status 1

/usr/lib64/python2.7/subprocess.py:186: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists
OK user dirsrv exists
----------------------------- Captured stderr call -----------------------------


Generating key.  This may take a few moments...



Generating key.  This may take a few moments...

Job for dirsrv@standalone_1.service failed because the control process exited 
with error code. See "systemctl status dirsrv@standalone_1.service" and 
"journalctl -xe" for details.
____________________________ test_pwp_history_test _____________________________

topology_st = <lib389.topologies.TopologyMain object at 0x7f7d692654d0>

    def test_pwp_history_test(topology_st):
        """
        Test password policy history feature:
            - Test password history is enforced
            - Test password history works after an Admin resets the password
            - Test that the correct number of passwords are stored in history
        """
    
        USER_DN = '\''uid=testuser,'\'' + DEFAULT_SUFFIX
    
        #
        # Configure password history policy and add a test user
        #
        try:
            topology_st.standalone.modify_s("cn=config",
                                            [(ldap.MOD_REPLACE,
                                              '\''passwordHistory'\'', 
'\''on'\''),
                                             (ldap.MOD_REPLACE,
                                              '\''passwordInHistory'\'', 
'\''3'\''),
                                             (ldap.MOD_REPLACE,
                                              '\''passwordChange'\'', 
'\''on'\''),
                                             (ldap.MOD_REPLACE,
                                              '\''passwordStorageScheme'\'', 
'\''CLEAR'\'')])
            log.info('\''Configured password policy.'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to configure password policy: '\'' + str(e))
            assert False
        time.sleep(1)
    
        try:
            topology_st.standalone.add_s(Entry((USER_DN, {
                '\''objectclass'\'': ['\''top'\'', '\''extensibleObject'\''],
                '\''sn'\'': '\''user'\'',
                '\''cn'\'': '\''test user'\'',
                '\''uid'\'': '\''testuser'\'',
                '\''userpassword'\'': '\''password'\''})))
        except ldap.LDAPError as e:
            log.fatal('\''Failed to add test user'\'' + USER_DN + '\'': error 
'\'' + str(e))
            assert False
    
        #
        # Test that password history is enforced.
        #
        try:
            topology_st.standalone.simple_bind_s(USER_DN, '\''password'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to bind as user: '\'' + str(e))
            assert False
    
        # Attempt to change password to the same password
        try:
            topology_st.standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE,
                                                       '\''userpassword'\'', 
'\''password'\'')])
            log.info('\''Incorrectly able to to set password to existing 
password.'\'')
            assert False
        except ldap.CONSTRAINT_VIOLATION:
            log.info('\''Password change correctly rejected'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to attempt to change password: '\'' + str(e))
            assert False
    
        #
        # Keep changing password until we fill the password history (3)
        #
    
        # password1
        try:
            topology_st.standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE,
                                                       '\''userpassword'\'', 
'\''password1'\'')])
        except ldap.LDAPError as e:
            log.fatal('\''Failed to change password: '\'' + str(e))
            assert False
        try:
            topology_st.standalone.simple_bind_s(USER_DN, '\''password1'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to bind as user using "password1": '\'' + 
str(e))
            assert False
        time.sleep(1)
    
        # password2
        try:
            topology_st.standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE,
                                                       '\''userpassword'\'', 
'\''password2'\'')])
        except ldap.LDAPError as e:
            log.fatal('\''Failed to change password: '\'' + str(e))
            assert False
        try:
            topology_st.standalone.simple_bind_s(USER_DN, '\''password2'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to bind as user using "password2": '\'' + 
str(e))
            assert False
        time.sleep(1)
    
        # password3
        try:
            topology_st.standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE,
                                                       '\''userpassword'\'', 
'\''password3'\'')])
        except ldap.LDAPError as e:
            log.fatal('\''Failed to change password: '\'' + str(e))
            assert False
        try:
            topology_st.standalone.simple_bind_s(USER_DN, '\''password3'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to bind as user using "password3": '\'' + 
str(e))
            assert False
        time.sleep(1)
    
        # password4
        try:
            topology_st.standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE,
                                                       '\''userpassword'\'', 
'\''password4'\'')])
        except ldap.LDAPError as e:
            log.fatal('\''Failed to change password: '\'' + str(e))
            assert False
        try:
            topology_st.standalone.simple_bind_s(USER_DN, '\''password4'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to bind as user using "password4": '\'' + 
str(e))
            assert False
        time.sleep(1)
    
        #
        # Check that we only have 3 passwords stored in history\
        #
        try:
            entry = topology_st.standalone.search_s(USER_DN, ldap.SCOPE_BASE,
                                                    '\''objectclass=*'\'',
                                                    ['\''passwordHistory'\''])
            pwds = entry[0].getValues('\''passwordHistory'\'')
            if len(pwds) != 3:
                log.fatal('\''Incorrect number of passwords stored in histry: 
%d'\'' %
                          len(pwds))
                assert False
            else:
                log.info('\''Correct number of passwords found in history.'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to get user entry: '\'' + str(e))
            assert False
    
        #
        # Attempt to change the password to previous passwords
        #
        try:
            topology_st.standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE,
                                                       '\''userpassword'\'', 
'\''password1'\'')])
            log.info('\''Incorrectly able to to set password to previous 
password1.'\'')
            assert False
        except ldap.CONSTRAINT_VIOLATION:
            log.info('\''Password change correctly rejected'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to attempt to change password: '\'' + str(e))
            assert False
    
        try:
            topology_st.standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE,
                                                       '\''userpassword'\'', 
'\''password2'\'')])
            log.info('\''Incorrectly able to to set password to previous 
password2.'\'')
            assert False
        except ldap.CONSTRAINT_VIOLATION:
            log.info('\''Password change correctly rejected'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to attempt to change password: '\'' + str(e))
            assert False
        try:
            topology_st.standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE,
                                                       '\''userpassword'\'', 
'\''password3'\'')])
            log.info('\''Incorrectly able to to set password to previous 
password3.'\'')
            assert False
        except ldap.CONSTRAINT_VIOLATION:
            log.info('\''Password change correctly rejected'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to attempt to change password: '\'' + str(e))
            assert False
    
        #
        # Reset password by Directory Manager(admin reset)
        #
        try:
            topology_st.standalone.simple_bind_s(DN_DM, PASSWORD)
        except ldap.LDAPError as e:
            log.fatal('\''Failed to bind as rootDN: '\'' + str(e))
            assert False
    
        try:
            topology_st.standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE,
                                                       '\''userpassword'\'',
                                                       '\''password-reset'\'')])
        except ldap.LDAPError as e:
            log.fatal('\''Failed to attempt to reset password: '\'' + str(e))
            assert False
    
        # Try and change the password to the previous password before the reset
        try:
            topology_st.standalone.simple_bind_s(USER_DN, 
'\''password-reset'\'')
        except ldap.LDAPError as e:
            log.fatal('\''Failed to bind as user: '\'' + str(e))
            assert False
    
        try:
            topology_st.standalone.modify_s(USER_DN, [(ldap.MOD_REPLACE,
                                                       '\''userpassword'\'', 
'\''password4'\'')])
            log.info('\''Incorrectly able to to set password to previous 
password4.'\'')
>           assert False
E           assert False

<http://vm-058-081.abc.idm.lab.eng.brq.redhat.com:8080/job/389-DS-NIGHTLY/ws/source/389-ds-base/dirsrvtests/tests/suites/password/pwp_history_test.py>:220:
 AssertionError
---------------------------- Captured stdout setup -----------------------------
OK group dirsrv exists
OK user dirsrv exists
----------------------------- Captured stderr call -----------------------------
INFO:dirsrvtests.tests.suites.password.pwp_history_test:Configured password 
policy.
INFO:dirsrvtests.tests.suites.password.pwp_history_test:Password change 
correctly rejected
INFO:dirsrvtests.tests.suites.password.pwp_history_test:Correct number of 
passwords found in history.
INFO:dirsrvtests.tests.suites.password.pwp_history_test:Password change 
correctly rejected
INFO:dirsrvtests.tests.suites.password.pwp_history_test:Password change 
correctly rejected
INFO:dirsrvtests.tests.suites.password.pwp_history_test:Password change 
correctly rejected
INFO:dirsrvtests.tests.suites.password.pwp_history_test:Incorrectly able to to 
set password to previous password4.
=================== 2 failed, 507 passed in 10893.39 seconds 
==================='
+ '[' 1 -ne 0 ']'
+ echo CI Tests 'FAILED!'
CI Tests FAILED!
+ MSG=FAILED
+ RC=1
+ sudo /usr/sbin/sendmail mreyno...@redhat.com firsty...@redhat.com
+ sudo rm -rf /var/tmp/slapd.vg.115533 /var/tmp/slapd.vg.115626 
/var/tmp/slapd.vg.124214 /var/tmp/slapd.vg.93686
+ exit 1
Build step 'Execute shell' marked build as failure
_______________________________________________
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org

Reply via email to