Don't duplicate the LDAP gracelimit set in the previous test

Remove a duplicated policy change which sets the gracelimit
to 3.

We don't typically run tests individually but as a whole. If
we ever need to call this one test directly we can ignore
failures.

Fixes: https://pagure.io/freeipa/issue/9167

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Rob Crittenden 2022-05-31 08:52:08 -04:00 committed by Florence Blanc-Renaud
parent 773d3cb45d
commit aedb73a90d

View File

@ -312,10 +312,6 @@ class TestPWPolicy(IntegrationTest):
dn = "uid={user},cn=users,cn=accounts,{base_dn}".format( dn = "uid={user},cn=users,cn=accounts,{base_dn}".format(
user=USER, base_dn=str(self.master.domain.basedn)) user=USER, base_dn=str(self.master.domain.basedn))
self.master.run_command(
["ipa", "pwpolicy-mod", POLICY, "--gracelimit", "3", ],
)
# Resetting the password will mark it as expired # Resetting the password will mark it as expired
self.reset_password(self.master) self.reset_password(self.master)
@ -330,24 +326,18 @@ class TestPWPolicy(IntegrationTest):
result = tasks.ldapsearch_dm( result = tasks.ldapsearch_dm(
self.master, dn, ['passwordgraceusertime',], self.master, dn, ['passwordgraceusertime',],
) )
assert 'passwordgraceusertime: 2' in result.stdout_text.lower() assert 'passwordgraceusertime: 3' in result.stdout_text.lower()
result = tasks.ldapsearch_dm( result = tasks.ldapsearch_dm(
self.replicas[0], dn, ['passwordgraceusertime',], self.replicas[0], dn, ['passwordgraceusertime',],
) )
assert 'passwordgraceusertime: 0' in result.stdout_text.lower() # Never been set at all so won't return
assert 'passwordgraceusertime' not in result.stdout_text.lower()
self.reset_password(self.master)
# Resetting the password should reset passwordgraceusertime # Resetting the password should reset passwordgraceusertime
self.reset_password(self.master)
result = tasks.ldapsearch_dm( result = tasks.ldapsearch_dm(
self.master, dn, ['passwordgraceusertime',], self.master, dn, ['passwordgraceusertime',],
) )
assert 'passwordgraceusertime: 0' in result.stdout_text.lower() assert 'passwordgraceusertime: 0' in result.stdout_text.lower()
self.reset_password(self.master) self.reset_password(self.master)
result = tasks.ldapsearch_dm(
self.replicas[0], dn, ['passwordgraceusertime',],
)
assert 'passwordgraceusertime: 0' in result.stdout_text.lower()
self.reset_password(self.master)