From 2487c99c8d56d01cfc3832360d94e7309694521c Mon Sep 17 00:00:00 2001 From: aborah Date: Tue, 11 Jul 2023 18:52:09 +0530 Subject: [PATCH] Tests: Fix test_0002_bz1928648 with new ssh module Fix test_0002_bz1928648 with new ssh module Reviewed-by: Shridhar Gadekar --- src/tests/multihost/alltests/test_offline.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/tests/multihost/alltests/test_offline.py b/src/tests/multihost/alltests/test_offline.py index f07832a009b..9243bf8bf34 100644 --- a/src/tests/multihost/alltests/test_offline.py +++ b/src/tests/multihost/alltests/test_offline.py @@ -10,7 +10,7 @@ import time import pytest from sssd.testlib.common.utils import sssdTools -from sssd.testlib.common.expect import pexpect_ssh +from sssd.testlib.common.ssh2_python import check_login_client from constants import ds_instance_name @@ -101,13 +101,9 @@ def test_0002_bz1928648(self, multihost, backupsssdconf): f' -j DROP') assert block_ip.returncode == 0 user = 'foo1@example1' - client_hostname = multihost.client[0].sys_hostname - client = pexpect_ssh(client_hostname, user, 'Secret123', - debug=False) + time.sleep(5) with pytest.raises(Exception): - client.login(login_timeout=5, - sync_multiplier=1, - auto_prompt_reset=False) + check_login_client(multihost, user, 'Secret123') multihost.client[0].run_command(f"iptables " f"-D OUTPUT -d " f"{hostname} -j DROP")