make host key check an enum instead of an literal type

this is more typesafe at runtime.
This commit is contained in:
Jörg Thalheim
2025-07-02 17:33:32 +02:00
parent 7f4f11751e
commit 543c518ed0
11 changed files with 63 additions and 44 deletions

View File

@@ -4,6 +4,7 @@ from pathlib import Path
import pytest
from clan_cli.tests.sshd import Sshd
from clan_lib.ssh.host_key import HostKeyCheck
from clan_lib.ssh.remote import Remote
@@ -16,7 +17,7 @@ def hosts(sshd: Sshd) -> list[Remote]:
port=sshd.port,
user=login,
private_key=Path(sshd.key),
host_key_check="none",
host_key_check=HostKeyCheck.NONE,
command_prefix="local_test",
)
]