URL: https://github.com/freeipa/freeipa/pull/5369
Author: abbra
 Title: #5369: tests_webui: flip leading and trailing space password test
Action: opened

PR body:
"""
With commit 809d9cb we now allow leading and trailing space in passwords. Fix 
Web UI tests to follow this change.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/5369/head:pr5369
git checkout pr5369
From e64eb0a9ccee66b824b6e2442552003d79a6b57d Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <aboko...@redhat.com>
Date: Sat, 19 Dec 2020 10:44:31 +0200
Subject: [PATCH 1/2] tests_webui: flip leading and trailing space password
 test

With commit 809d9cb80f5f4471f125823888f37875aa37809e we now allow
leading and trailing space in passwords. Fix Web UI tests to follow this
change.

Fixes: https://pagure.io/freeipa/issue/8629
Signed-off-by: Alexander Bokovoy <aboko...@redhat.com>
---
 ipatests/test_webui/test_user.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/ipatests/test_webui/test_user.py b/ipatests/test_webui/test_user.py
index 179fda27ce5..d8ab01b293a 100644
--- a/ipatests/test_webui/test_user.py
+++ b/ipatests/test_webui/test_user.py
@@ -55,8 +55,6 @@
 ACTIVE_ERR = 'active user with name "{}" already exists'
 DISABLED = 'This entry is already disabled'
 LONG_LOGIN = "invalid 'login': can be at most 32 characters"
-INV_PASSWD = ("invalid 'password': Leading and trailing spaces are "
-              "not allowed")
 
 
 @pytest.mark.tier1
@@ -508,21 +506,17 @@ def test_add_user_special(self):
         # click add and cancel
         self.add_record(user.ENTITY, user.DATA, dialog_btn='cancel')
 
-        # add leading space before password (should FAIL)
+        # 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')
-        self.assert_last_error_dialog(INV_PASSWD)
-        self.close_all_dialogs()
 
-        # add trailing space before password (should FAIL)
+        # 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')
-        self.assert_last_error_dialog(INV_PASSWD)
-        self.close_all_dialogs()
 
         # add user using enter
         self.add_record(user.ENTITY, user.DATA2, negative=True)

From fd0dc679ab763e8a01e9ec0697afc2708691aaec Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <aboko...@redhat.com>
Date: Sat, 19 Dec 2020 10:49:38 +0200
Subject: [PATCH 2/2] Temp commit to test web UI

Signed-off-by: Alexander Bokovoy <aboko...@redhat.com>
---
 .freeipa-pr-ci.yaml                        |  2 +-
 ipatests/prci_definitions/temp_commit.yaml | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/.freeipa-pr-ci.yaml b/.freeipa-pr-ci.yaml
index abcf8c5b634..80656690080 120000
--- a/.freeipa-pr-ci.yaml
+++ b/.freeipa-pr-ci.yaml
@@ -1 +1 @@
-ipatests/prci_definitions/gating.yaml
\ No newline at end of file
+ipatests/prci_definitions/temp_commit.yaml
\ No newline at end of file
diff --git a/ipatests/prci_definitions/temp_commit.yaml b/ipatests/prci_definitions/temp_commit.yaml
index b297cd4e319..d0400d8ff17 100644
--- a/ipatests/prci_definitions/temp_commit.yaml
+++ b/ipatests/prci_definitions/temp_commit.yaml
@@ -61,14 +61,16 @@ jobs:
         timeout: 1800
         topology: *build
 
-  fedora-latest/temp_commit:
+  fedora-latest/test_webui_users:
     requires: [fedora-latest/build]
     priority: 50
     job:
-      class: RunPytest
+      class: RunWebuiTests
       args:
         build_url: '{fedora-latest/build_url}'
-        test_suite: test_integration/test_REPLACEME.py
+        test_suite: >-
+          test_webui/test_group.py
+          test_webui/test_user.py
         template: *ci-master-latest
-        timeout: 3600
-        topology: *master_1repl_1client
+        timeout: 4800
+        topology: *ipaserver
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to