Fail tests which require an sshd server but we can't find the path to sftp-server

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-10-16 13:26:25 +01:00 committed by Megan Wilhite
parent d9893886bb
commit b0d0e32b50

View file

@ -1432,7 +1432,7 @@ def sshd_server(salt_factories, sshd_config_dir, salt_master, grains):
if os.path.exists(path):
sftp_server_path = path
if sftp_server_path is None:
log.warning(f"Failed to find 'sftp-server'. Searched: {sftp_server_paths}")
pytest.fail(f"Failed to find 'sftp-server'. Searched: {sftp_server_paths}")
else:
sshd_config_dict["Subsystem"] = f"sftp {sftp_server_path}"
factory = salt_factories.get_sshd_daemon(