Skip to content

Commit

Permalink
Change: Fasten the CI by using a short timeout for SSH connection tests
Browse files Browse the repository at this point in the history
Improve running the CI especially in the CI by using a very short
timeout for the SSH connection tests where the connection should fail.
  • Loading branch information
bjoernricks committed Apr 3, 2023
1 parent 0300fe5 commit 878d4c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/connections/test_ssh_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def test_connect(self):

def test_connect_unknown_host(self):
ssh_connection = SSHConnection(
hostname="0.0.0.1", known_hosts_file=self.known_hosts_file
hostname="0.0.0.1",
known_hosts_file=self.known_hosts_file,
timeout=1.0,
)
with self.assertRaises(
GvmError,
Expand Down Expand Up @@ -125,7 +127,9 @@ def test_connect_no_known_hosts_file(self):
os.remove(self.known_hosts_file)

ssh_connection = SSHConnection(
hostname="0.0.0.1", known_hosts_file=self.known_hosts_file
hostname="0.0.0.1",
known_hosts_file=self.known_hosts_file,
timeout=1.0,
)
with self.assertRaises(
GvmError,
Expand Down

0 comments on commit 878d4c3

Please sign in to comment.