Skip to content

Commit

Permalink
Tests: Fix test_0002_bz1928648 with new ssh module
Browse files Browse the repository at this point in the history
Fix test_0002_bz1928648 with new ssh module

Reviewed-by: Shridhar Gadekar <[email protected]>
  • Loading branch information
aborah-sudo authored and jakub-vavra-cz committed Jul 11, 2023
1 parent 5e86af8 commit 2487c99
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/tests/multihost/alltests/test_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 2487c99

Please sign in to comment.