ipatests: test for root using admin password in webUI

Check if there is no infinite loop caused by this
combination of user and password

Related: https://pagure.io/freeipa/issue/9226

Signed-off-by: Erik Belko <ebelko@redhat.com>
Reviewed-By: Michal Polovka <mpolovka@redhat.com>
This commit is contained in:
Erik Belko
2022-11-07 15:52:23 +01:00
committed by Michal Polovka
parent 38728dd518
commit 815f18396c
2 changed files with 17 additions and 0 deletions

View File

@@ -8,6 +8,9 @@ PKEY = 'itest-user'
PASSWD_ITEST_USER = '12345678'
PASSWD_ITEST_USER_NEW = '87654321'
ROOT_PKEY = 'root'
PASSWD_ADMIN = 'Secret.123'
# used for add/delete fixture test user
DATA_ITEST_USER = {
'pkey': PKEY,

View File

@@ -401,3 +401,17 @@ class TestLoginScreen(UI_driver):
self.wait(0.5)
self.check_elements_of_form(loginscreen.LOGIN_FORM)
self.check_alerts(loginscreen.LOGIN_FORM)
@screenshot
def test_root_login(self):
"""
Verify logging as root, using admin password.
Root should be recognized as an alias for admin user.
Related: https://pagure.io/freeipa/issue/9226
"""
self.load()
assert self.login_screen_visible()
self.login(loginscreen.ROOT_PKEY, loginscreen.PASSWD_ADMIN)
assert self.logged_in()