This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch master
in repository 389-ds-base.
commit da4ebf7a4c9248f3415bf3a7d4f4847417dfeefc
Author: Sankar Ramalingam <sramling(a)redhat.com>
Date: Thu Aug 17 11:26:56 2017 +0530
Ticket #48081 - Add regression tests for pwpolicy
Description: Adding two more tests which will validate OU and
Givenname attributes for userPassword.
https://pagure.io/389-ds-base/issue/48081
Reviewed by: spichugi
Signed-off-by: Simon Pichugin <spichugi(a)redhat.com>
---
.../tests/suites/password/regression_test.py | 26 +++++++++++++---------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/dirsrvtests/tests/suites/password/regression_test.py
b/dirsrvtests/tests/suites/password/regression_test.py
index e2cbecc..eeed135 100644
--- a/dirsrvtests/tests/suites/password/regression_test.py
+++ b/dirsrvtests/tests/suites/password/regression_test.py
@@ -18,8 +18,12 @@ else:
logging.getLogger(__name__).setLevel(logging.INFO)
log = logging.getLogger(__name__)
-TEST_PASSWORDS = ('CN12pwtest31', 'SN3pwtest231',
'UID1pwtest123', 'MAIL2pwtest12(a)redhat.com')
-user_data = {'cn': 'CNpwtest1', 'sn': 'SNpwtest1',
'uid': 'UIDpwtest1', 'mail': 'MAILpwtest1(a)redhat.com'}
+user_data = {'cn': 'CNpwtest1', 'sn': 'SNpwtest1',
'uid': 'UIDpwtest1', 'mail': 'MAILpwtest1(a)redhat.com',
+ 'givenname': 'GNpwtest1'}
+TEST_PASSWORDS1 = list(user_data.values())
+TEST_PASSWORDS1.append('People')
+TEST_PASSWORDS2 = (
+ 'CN12pwtest31', 'SN3pwtest231', 'UID1pwtest123',
'MAIL2pwtest12(a)redhat.com', '2GN1pwtest123', 'People123')
@pytest.fixture(scope="module")
@@ -67,17 +71,17 @@ def test_user(topo, request):
@pytest.mark.bz1465600
-(a)pytest.mark.parametrize("user_pasw", (user_data.values()))
+(a)pytest.mark.parametrize("user_pasw", TEST_PASSWORDS1)
def test_trivial_passw_check(topo, passw_policy, test_user, user_pasw):
- """PasswordCheckSyntax attribute fails to validate cn, sn, uid and
mail attributes
+ """PasswordCheckSyntax attribute fails to validate cn, sn, uid,
givenname, ou and mail attributes
:id: bf9fe1ef-56cb-46a3-a6f8-5530398a06dc
:feature: Password policy
:setup: Standalone instance.
:steps: 1. Configure password policy with PasswordCheckSyntax set to on.
- 2. Add users with cn, sn, uid, mail and userPassword attributes.
+ 2. Add users with cn, sn, uid, givenname, mail and userPassword attributes.
3. Configure subtree password policy for ou=people subtree.
- 4. Reset userPassword with trivial values like cn, sn, uid and mail.
+ 4. Reset userPassword with trivial values like cn, sn, uid, givenname, ou and
mail attributes.
:expectedresults:
1. Enabling PasswordCheckSyntax should PASS.
2. Add users should PASS.
@@ -98,20 +102,20 @@ def test_trivial_passw_check(topo, passw_policy, test_user,
user_pasw):
@pytest.mark.bz1468284
-(a)pytest.mark.parametrize("user_pasw", TEST_PASSWORDS)
+(a)pytest.mark.parametrize("user_pasw", TEST_PASSWORDS2)
def test_cn_sn_like_passw(topo, passw_policy, test_user, user_pasw):
- """Passwords rejected if its similar to uid, cn, sn or mail
attributes
+ """Passwords rejected if its similar to uid, cn, sn, givenname, ou and
mail attributes
:id: dfd6cf5d-8bcd-4895-a691-a43ad9ec1be8
:feature: Password policy
:setup: Standalone instance
:steps: 1. Configure password policy with PasswordCheckSyntax set to on
- 2. Add users with cn, sn, uid, mail and userPassword attributes
- 3. Replace userPassword similar to cn, sn, uid and mail attribute
+ 2. Add users with cn, sn, uid, mail, givenname and userPassword attributes
+ 3. Replace userPassword similar to cn, sn, uid, givenname, ou and mail
attributes
:expectedresults:
1. Enabling PasswordCheckSyntax should PASS.
2. Add users should PASS.
- 3. Resetting userPasswords similar to cn, sn, uid and mail should PASS.
+ 3. Resetting userPasswords similar to cn, sn, uid, givenname, ou and mail
attributes should PASS.
"""
log.info('Configure Pwpolicy with PasswordCheckSyntax and nsslapd-pwpolicy-local
set to off')
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.