Skip to content

Commit

Permalink
Increase verbosity for tests on CI in test case
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Feb 25, 2021
1 parent f2c9ece commit 0980f25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/functional_test_ssh_fingerprint_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ def test_reports_stderr_messages(self):
'EXPECTED_FINGERPRINT': 'BAKUNIN'
}, {})

self.assertIn('getaddrinfo non-existing-host: Name or service not known', result.output.strip())
self.assertIn('getaddrinfo non-existing-host', result.output.strip())
self.assertFalse(result.exit_status)
9 changes: 6 additions & 3 deletions tests/utils/ssh_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ def _wait_for_container_to_be_ready():

@staticmethod
def get_current_ssh_server_fingerprint():
return subprocess.check_output(
'ssh-keyscan -t rsa -p 3222 localhost', stderr=subprocess.DEVNULL, shell=True
).decode('utf-8')
try:
return subprocess.check_output(
'ssh-keyscan -t rsa -p 3222 localhost', stderr=subprocess.PIPE, shell=True
).decode('utf-8')
except subprocess.CalledProcessError as err:
return err.stderr.decode('utf-8') + "\n" + err.stdout.decode('utf-8')

@staticmethod
def _get_container_name() -> str:
Expand Down

0 comments on commit 0980f25

Please sign in to comment.