The nightly test test_webui/test_user.py::test_user::test_add_user_special started failing after commit 809d9cb: Allow leading/trailing whitespaces in passwords
test_webui/test_user.py::test_user::test_add_user_special
See for instance PR #598 with the following report and logs:
self = <ipatests.test_webui.test_user.test_user object at 0x7f2737243910> @screenshot def test_add_user_special(self): """ Test various add user special cases """ self.init_app() # Test invalid characters (#@*?) in login self.navigate_to_entity(user.ENTITY) self.facet_button_click('add') self.fill_textbox('uid', 'itest-user#') self.assert_field_validation(ERR_INCLUDE) self.fill_textbox('uid', 'itest-user@') self.assert_field_validation(ERR_INCLUDE) self.fill_textbox('uid', 'itest-user*') self.assert_field_validation(ERR_INCLUDE) self.fill_textbox('uid', 'itest-user?') self.assert_field_validation(ERR_INCLUDE) self.dialog_button_click('cancel') # Add an user with special chars self.basic_crud(user.ENTITY, user.DATA_SPECIAL_CHARS) # Add an user with long login (should FAIL) self.add_record(user.ENTITY, user.DATA_LONG_LOGIN, negative=True) self.assert_last_error_dialog(expected_err=LONG_LOGIN) self.close_all_dialogs() # Test password mismatch self.add_record(user.ENTITY, user.DATA_PASSWD_MISMATCH, negative=True) pass_e = self.find('.widget[name="userpassword2"]', By.CSS_SELECTOR) self.assert_field_validation(ERR_MISMATCH, parent=pass_e) self.dialog_button_click('cancel') self.assert_record(user.DATA_PASSWD_MISMATCH.get('pkey'), negative=True) # test add and edit record self.add_record(user.ENTITY, user.DATA2, dialog_btn='add_and_edit') self.action_list_action('delete_active_user') # click add and cancel self.add_record(user.ENTITY, user.DATA, dialog_btn='cancel') # add leading space before password (should FAIL) self.navigate_to_entity(user.ENTITY) self.facet_button_click('add') self.fill_fields(user.DATA_PASSWD_LEAD_SPACE['add']) self.dialog_button_click('add') > self.assert_last_error_dialog(INV_PASSWD) test_webui/test_user.py:516: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_webui/ui_driver.py:2352: in assert_last_error_dialog self.assert_text(s, expected_err, parent=err_dialog) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ipatests.test_webui.test_user.test_user object at 0x7f2737243910> selector = '.modal-body div p' value = "invalid 'password': Leading and trailing spaces are not allowed" parent = None def assert_text(self, selector, value, parent=None): """ Assert read-only text value in details page or in a form """ text = self.get_text(selector, parent) text = text.strip() value = value.strip() > assert text == value, "Invalid value: '%s' Expected: %s" % (text, value) E AssertionError: Invalid value: '' Expected: invalid 'password': Leading and trailing spaces are not allowed test_webui/ui_driver.py:2043: AssertionError
The test is creating a user password with leading space and expects an error but needs to be adapted because the password should now be accepted.
@atorresm Could you have a look and fix the test? Thanks.
This is addressed by https://github.com/freeipa/freeipa/pull/5369
Metadata Update from @abbra: - Issue assigned to abbra
master:
ipa-4-9:
Metadata Update from @abbra: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)