#9746 Nightly-previous-selinux ipa-4-10 regression in test_webui/test_user.py::test_user::test_add_user_special
Opened 2 months ago by dhanina. Modified 2 months ago

The nightly-previous-selinux ipa-4-10 test test_webui/test_user.py::test_user::test_add_user_special is failing at AssertionError: Record exists when it shouldn't: itest-user2.

This is possibly a regression, it's hard to me to tell whether this is our config mismatch, selinux regression or anything other. It seems that the user-del command may not be working correctly, probably only when called via webui as otherwise I would've expected more failures.

self = <ipatests.test_webui.test_user.test_user object at 0x7f3a6ba1c550>

    @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 SUCCEED)
        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')

        # add trailing space before password (should SUCCEED)
        self.navigate_to_entity(user.ENTITY)
        self.facet_button_click('add')
        self.fill_fields(user.DATA_PASSWD_TRAIL_SPACE['add'])
        self.dialog_button_click('add')

        # add user using enter
        self.add_record(user.ENTITY, user.DATA2, negative=True)
        actions = ActionChains(self.driver)
        actions.send_keys(Keys.ENTER).perform()
        self.wait()
        self.assert_notification(assert_text=USR_ADDED)
        self.assert_record(user.PKEY2)
        self.close_notifications()

        # delete user using enter
        self.select_record(user.PKEY2)
        self.facet_button_click('remove')
        actions.send_keys(Keys.ENTER).perform()
        self.wait(0.5)
        self.assert_notification(assert_text='1 item(s) deleted')
>       self.assert_record(user.PKEY2, negative=True)

actions    = <selenium.webdriver.common.action_chains.ActionChains object at 0x7f3a68dc3710>
pass_e     = <selenium.webdriver.firefox.webelement.FirefoxWebElement (session="1cde8fb2-093c-44af-9e87-90e31b08427b", element="dc0ea13d-2bb6-4eb0-8f82-c91755fdbef3")>
self       = <ipatests.test_webui.test_user.test_user object at 0x7f3a6ba1c550>

test_webui/test_user.py:638: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ipatests.test_webui.test_user.test_user object at 0x7f3a6ba1c550>
pkey = 'itest-user2', parent = None, table_name = None, negative = True

    def assert_record(self, pkey, parent=None, table_name=None, negative=False):
        """
        Assert that record is in current search table
        """
        has = self.has_record(pkey, parent, table_name)
        has |= self.has_record(pkey.lower(), parent, table_name)
        if negative:
>           assert not has, "Record exists when it shouldn't: %s" % pkey
E           AssertionError: Record exists when it shouldn't: itest-user2

has        = True
negative   = True
parent     = None
pkey       = 'itest-user2'
self       = <ipatests.test_webui.test_user.test_user object at 0x7f3a6ba1c550>
table_name = None

test_webui/ui_driver.py:2202: AssertionError

Artifacts
Do note, that this is actually shown as passing in Release Dashboard due to another bug on their side (I think it also removed the report.html).


Metadata Update from @dhanina:
- Issue tagged with: test-failure, webui

2 months ago

Metadata Update from @mpolovka:
- Issue assigned to mpolovka

2 months ago

Log in to comment on this ticket.

Metadata