tests: Extend PSO tests to cover password-history/length/complexity
authorTim Beale <timbeale@catalyst.net.nz>
Tue, 8 May 2018 02:45:17 +0000 (14:45 +1200)
committerGarming Sam <garming@samba.org>
Wed, 23 May 2018 04:55:30 +0000 (06:55 +0200)
Unhobble the PSO test cases so that they not only check the
msDS-ResultantPSO constructed attribute, but also that the corresponding
PSO's password-history, minimum password length, and complexity settings
are actually used.

The tests now fail once more, as actually using the PSO's settings isn't
implemented yet.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
selftest/knownfail.d/password_settings
source4/dsdb/tests/python/password_settings.py

index a3c6a72cabfdaf41d7d03c0475ee86969de424d3..a0cf46fda71dcc8480ad1d4b0289353701ae1229 100644 (file)
@@ -1,3 +1,7 @@
+samba4.ldap.password_settings.python.password_settings.PasswordSettingsTestCase.test_pso_basics\(ad_dc_ntvfs\)
+samba4.ldap.password_settings.python.password_settings.PasswordSettingsTestCase.test_pso_equal_precedence\(ad_dc_ntvfs\)
+samba4.ldap.password_settings.python.password_settings.PasswordSettingsTestCase.test_pso_nested_groups\(ad_dc_ntvfs\)
+samba4.ldap.password_settings.python.password_settings.PasswordSettingsTestCase.test_pso_special_groups\(ad_dc_ntvfs\)
 samba4.ldap.password_settings.python.password_settings.PasswordSettingsTestCase.test_pso_min_age\(ad_dc_ntvfs\)
 samba4.ldap.password_settings.python.password_settings.PasswordSettingsTestCase.test_pso_max_age\(ad_dc_ntvfs\)
 samba4.ldap.password_settings.python.password_settings.PasswordSettingsTestCase.test_pso_add_user\(ad_dc_ntvfs\)
index 4ba534f956d87e52471560ffddb52b1874fdaa45..7712d2415978a823484a98fa16393e6f036bc315 100644 (file)
@@ -129,11 +129,6 @@ class PasswordSettingsTestCase(PasswordTestCase):
                         "Expected PSO %s, not %s" %(pso.name,
                                                     str(resultant_pso)))
 
-        # temporarily returning early here will just test the resultant-PSO
-        # constructed attribute. Remove this return to also test min password
-        # length, complexity, and password-history
-        return
-
         # we're mirroring the pwd_history for the user, so make sure this is
         # up-to-date, before we start making password changes
         if user.last_pso: