mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-25 16:31:08 -06:00
ipatests: test_commands: test_login_wrong_password: look farther in time
Sometimes test_login_wrong_password fails because the log window the string message is searched in is too narrow. Broaden the window by looking at the past 10 seconds. Fixes: https://pagure.io/freeipa/issue/8432 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
parent
062e18c4f0
commit
3546fef0bb
@ -20,6 +20,7 @@ from subprocess import CalledProcessError
|
|||||||
|
|
||||||
from cryptography.hazmat.backends import default_backend
|
from cryptography.hazmat.backends import default_backend
|
||||||
from cryptography import x509
|
from cryptography import x509
|
||||||
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
from ipalib.constants import IPAAPI_USER
|
from ipalib.constants import IPAAPI_USER
|
||||||
|
|
||||||
@ -1202,7 +1203,11 @@ class TestIPACommand(IntegrationTest):
|
|||||||
|
|
||||||
sshconn = paramiko.SSHClient()
|
sshconn = paramiko.SSHClient()
|
||||||
sshconn.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
sshconn.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
since = time.strftime('%H:%M:%S')
|
# start to look at logs a bit before "now"
|
||||||
|
# https://pagure.io/freeipa/issue/8432
|
||||||
|
since = time.strftime(
|
||||||
|
'%H:%M:%S', (datetime.now() - timedelta(seconds=10)).timetuple()
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
sshconn.connect(self.master.hostname,
|
sshconn.connect(self.master.hostname,
|
||||||
username=self.testuser,
|
username=self.testuser,
|
||||||
|
Loading…
Reference in New Issue
Block a user